Martijn Pieters wrote:
Going through the source I found some stuff involving all_meta_types, meta_types and lots of magic code (to me) that seems to make products addable to folders. Zope's sources could use some documenting though. I am assuming there is a clean mechanism to say: 'these products can only be added to this ObjectManagerish product, and nowhere else'. Could a real Zope Guru speak up now?
Heh, I hate to tell you this, Martijn, but to almost everyone reading this, YOU are one of the "real Zope Gurus". I think your Zope Zen level is at least three koans higher than mine. :) -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
At 02:58 22-11-99 , Tres Seaver wrote:
Martijn Pieters wrote:
Going through the source I found some stuff involving all_meta_types, meta_types and lots of magic code (to me) that seems to make products addable to folders. Zope's sources could use some documenting though. I am assuming there is a clean mechanism to say: 'these products can only be added to this ObjectManagerish product, and nowhere else'. Could a real Zope Guru speak up now?
Heh, I hate to tell you this, Martijn, but to almost everyone reading this, YOU are one of the "real Zope Gurus". I think your Zope Zen level is at least three koans higher than mine. :)
Thank you for the compliment Tres, but that was not me, but Martijn Faassen, also known as The Other Martijn (tm, we both claim this title). =) -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | T: +31 35 7502100 F: +31 35 7502111 | mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ---------------------------------------------
Martijn Pieters wrote:
At 02:58 22-11-99 , Tres Seaver wrote:
Martijn Pieters wrote:
No, *this* was: Martijn Faassen wrote:
Going through the source I found some stuff involving all_meta_types, meta_types and lots of magic code (to me) that seems to make products addable to folders. Zope's sources could use some documenting though. I am assuming there is a clean mechanism to say: 'these products can only be added to this ObjectManagerish product, and nowhere else'. Could a real Zope Guru speak up now?
Heh, I hate to tell you this, Martijn, but to almost everyone reading this, YOU are one of the "real Zope Gurus". I think your Zope Zen level is at least three koans higher than mine. :)
Thank you for the compliment Tres, but that was not me, but Martijn Faassen, also known as The Other Martijn (tm, we both claim this title). =)
Right. Now that the Other Martijn is here anyway, could you please help me with my custom folder problem? :) Groeten, Martijn
At 16:17 22-11-99 , Martijn Faassen wrote:
Right. Now that the Other Martijn is here anyway, could you please help me with my custom folder problem? :)
You're in luck, I've got a few minutes. =) all_meta_types is used to determine what objects are addable. It simply returns any acquired property _product_meta_types (which is filled with initialized products, I think) and the meta_types proprty. It returns list of dictionaries with 'name' and 'action' entries. lib\python\ZClasses\Property.py for example does what you want like this: meta_types=( Globals.Dictionary(name=ZCommonSheet.meta_type, action='manage_addCommonSheetForm'), ) def all_meta_types(self): return self.meta_types which shows also how to have objects that cannot be added anywhere else. Just don't register them with context.registerClass, only reference their constructor in the dictionary returned by meta_types. -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | T: +31 35 7502100 F: +31 35 7502111 | mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ---------------------------------------------
Martijn Pieters wrote:
At 16:17 22-11-99 , Martijn Faassen wrote:
Right. Now that the Other Martijn is here anyway, could you please help me with my custom folder problem? :)
You're in luck, I've got a few minutes. =)
[explanation snipped] Thank you! I'm glad you had a few minutes, as now ZFormulator (my web form automation system) is another big leap closer to initial release! It worked! ZFormulator is full of Zope hackery in order to shield the ordinary python programmer (me :) from Zope's internals, and to avoid all kinds of code duplication as well. Paradoxically I learnt a lot about Zope's internals as a result. Significant amounts of Zope Zen have been acquired. :) But now I can stop thinking about them for a while and add new field types to ZFormulator. Thanks again! Martijn
participants (3)
-
Martijn Faassen -
Martijn Pieters -
Tres Seaver