Hello, I posted this question to zope-dev but got no answer and noticed that most of the traffic appears to be on the zope list, so let's try again ;-) I'm trying to write an external method that exports an object to the filesystem as a folder, with all its properties stored as files. I have a prototype working in wich I use 'dir(self)' to get a list of all the properties of the object. It kinda works now, but I was wondering what the correct way is to get all the properties wich are stored for an object in de objectdatabase. Do I have to access them through the propertysheets ? And what happens then if I delete one from a propertysheet, while the object still has it stored? Thanks for any help. Kind regards, Leon de Heus. _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev (Related lists - please, no cross posts or HTML encoding! To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
I have a prototype working in wich I use 'dir(self)' to get a list of all the properties of the object. It kinda works now, but I was wondering what the correct way is to get all the properties wich are stored for an object in de objectdatabase. Do I have to access them through the propertysheets ? And what happens then if I delete one from a propertysheet, while the object still has it stored?
Most objects that support properties are derived from PropertyManager, which contains these methods: def propertyIds(self): """Return a list of property ids """ def propertyValues(self): """Return a list of actual property objects """ def propertyItems(self): """Return a list of (id,property) tuples """ def propertyMap(self): """Return a tuple of mappings, giving meta-data for properties """ See the source for PropertyManager.py for more info. -jfarr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Hi! I'm a signature virus. Copy me into your .sig to join the fun! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks for the fast answer. I knew about PropertyManager.py and its methods (maybe I should have put that in my message), but I created several ZClasses wich only inherit from ObjectManager. So using propertyIds etc. doesn't work on objects from these classes. Does that mean that: a) I should design my ZClasses different, so they do support those methods or b) there are other methods to get the properties? Best, Leon de Heus.
participants (2)
-
Jonothan Farr -
Leon de Heus