26 Jan
2002
26 Jan
'02
8:49 p.m.
Jean Jordaan writes:
Short version of my question: how do I know when a form variable has been marshalled to a record? _.same_type(var, ????) The form variables and their type are usually part of the actions interface.
Usually, you do not check whether the form designer used ":record" or not, but you require him to do that. Maybe because of this, there is no easy way to check for "recordness". If you really want to check it, you can create a record in an External Method and use "same_type": (in an ExternalMethod): from ZPublisher.HTTPRequest import record def getRecordInstance(): '''return an empty 'record' instance.''' return record() Dieter