[Zope] SEC: UNCLASSIFIED RE: [Zope] How to 'add' a ZClass in DTML..

Cox, Neil Neil.Cox@cbr.defence.gov.au
Mon, 13 Sep 1999 15:30:45 +1000


Take a look at Kevin Dangoor's Adding ZClass Instances Programmatically How
To on the beta site.

It's at: http://www.zope.org:18200/Members/tazzzzz/addZClasses I've just
finished learning from it myself (or pehaps just started :)). Very useful it
was - thanks Kevin.

Cheers,
Neill

-----Original Message-----
From: Stuart Woolford [mailto:stuartw@newmail.net]
Sent: Monday, 13 September 1999 15:10
To: zope@zope.org
Subject: [Zope] How to 'add' a ZClass in DTML..



For a document I can do:
<dtml-call "manage_addDocument(blah, blah, blah)">

now, if I have a ZClass called STOCKProduct (meta STOCK)
how can I make one in DTML? It's beyond my meagre knowledge :(

Also, how to I 'initialise'  properties programatically on creation of a
ZClass?
(ie: I want to read them in from an SQL database on creation based on the
ID)
I assume I put some code in  STOCKClass_add, but I'll be darned if I can get
anything there to work correctly :(

Any help GREATLY appreciated.

------------------------------------------------------------ 
Stuart Woolford,
stuartw@newmail.net Unix Consultant.
Software Developer.
Supra Club of New Zealand.
------------------------------------------------------------

_______________________________________________
Zope maillist  -  Zope@zope.org
http://www.zope.org/mailman/listinfo/zope

(To receive general Zope announcements, see:
http://www.zope.org/mailman/listinfo/zope-announce

For developer-specific issues, zope-dev@zope.org -
http://www.zope.org/mailman/listinfo/zope-dev )