[Zope-dev] initializing objects in ZPatterns

Christian Scholz cs@comlounge.net
Thu, 22 Feb 2001 18:34:18 +0100


Hi!

> To get company_address stored, you can probably do something like:
> 
>   your_object.manage_changeProperties(company_address=your_object.company_address)
> 
> or possibly your_object.propertysheets.NameOfSheet.manage_changeProperties...
> depending on what kind of object you're using.

I've now tried

WHEN OBJECT ADDED CALL
  self.propertysheets.data.manage_changeProperties(company_address=self.company_address)

which gives me some Unauthorized error on the method call.

(when doing it manually in some dtml method after newItem() it works ok, though.
And I am logged in as Manager..)

Sometimes I wish Zope would print more about the details of such an response,
e.g. which permissions might be missing..

Anyway, I will keep experimenting with it (also tried to subclass directly from
DataSkin, to override some method which create the company address) but then
I noticed that it always needs to be a ZClass (except I would also implement my
own Rack, I guess..)
Wonder when the basic app will be running.. ;-)

ok, nice evening everybody! :)

-- christian