In message <[EMAIL PROTECTED]>, Paul Erickson <[EMAIL PROTECTED]> writes

Well I was trying to get a self contained class initialisation using a bit of python

I had defined a propertsheet called ClassConstants containing a tokens property with
"A B C" in my extern method initialiser I was doing 

    self = self.this()
    obj = self.ZC.createInObjectManager(id, REQUEST)
    obj.manage_addProperty('t','tokenList','multiple selection')

in the add form I could not seem to get access to the property tokenList
 I wasn't getting nice things from either
 <dtml-with "_.namespace(S=tokenList)">

not seeing the property.


 <dtml-with "_.namespace(S=Control_Panel.Products.myProduct.ZC.propertysheets.common

failing with a permissions problem

in the end I had to define a product external method called getTokenList
which did
def getQProjectList(self):
        obj = self.unrestrictedTraverse("Control_Panel/Products/myProduct/ZC/propert
        return obj.getProperty('tokenList')

How does one define properties which are visible at construction time?

>Just create a ZClass that inherits from ObjectManager, then you will
>have to use the Subobjects tab to tell it what kind of objects it can
>For properties, click on the Property Sheets tab and add one (be sure
>you're in the class, not the product). Put whatever properties on it
>that you like. Remember that properties won't get set in the constructor
>unless you uncomment the 
><dtml-call "propertysheets.Basic.manage_editProperties(
>                  REQUEST)">
>line in the constructor.  (change "Basic" if that's not what you called
>your property sheet.
>Robin Becker wrote:
>> I want to create a ZClass that is essentially a folder with some added
>> properties. I can see no way to add to the Basic properties of my
>> ZClass.
>> Is there a way to do that?
>> --
>> Robin Becker
>> _______________________________________________
>> Zope-Dev maillist  -  [EMAIL PROTECTED]
>> **  No cross posts or HTML encoding!  **
>> (Related lists -
>> )
Robin Becker

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to