[Zope-dev] Properties Introspection
Josh Zeidner
jmz_phylogenic@hotmail.com
Mon, 28 Feb 2000 19:30:18 EST
Not really, but here is the solution that Damien Morton and I found....
<dtml-in expr="propertysheets.main.propertyItems()">
<dtml-var sequence-item> : <dtml-var sequence-key><br>
this will iterate through a objects properties( an object that was defined
as a ZClass ).
thanks anyway...
Josh Zeidner
>Josh Zeidner <jmz_phylogenic@hotmail.com> asked:
> >
> > I am trying to develop a way to dynamically introspect an objects
> > properties( specifically, a ZClass ). How can I determine which
>sub-objects
> > of a Zope object are properties? Can I do this in DTML or do I need to
>use
> > python?
>
>Umm, does the 'hasProperty()' method do what you want?
>
> <dtml-if "hasProperty( 'Foo' )">
> <p>My Foo property is <dtml-var Foo>.</p>
> </dtml-if>
>
>--
>=========================================================
>Tres Seaver tseaver@palladion.com 713-523-6582
>Palladion Software http://www.palladion.com
>
>_______________________________________________
>Zope-Dev maillist - Zope-Dev@zope.org
>http://lists.zope.org/mailman/listinfo/zope-dev
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope )
>
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com