22 Nov
2002
22 Nov
'02
7:10 p.m.
Elena Schulz writes:
I want to get the properties and meta_type of objectId. the following script doesn't work. Any hints? When you report problems, you should add a precise problem description, e.g. Error Type/Value and Traceback.
-- many thanks for your replies, Elena
(please answer directly to my adress so I get your reply sooner, thx)
def main(self, objectId):
objectType = objectId.meta_type This probably fails because "objectId" is likely (according to its name) a string and not the object itself.
A string does not have an attribute "meta_type". You use "getattr" to access an attribute given its name. Therefore, the following may work: objectType= getattr(self,objectId).meta_type Dieter