[Zope] Bug zClass subobjects?

Rik Hoekstra rik.hoekstra@inghist.nl
Wed, 16 Aug 2000 17:40:48 +0200



> 
> (Second post)
> 
> (I speak french, sorry for my english!)
> I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
> zField_Date, etc.
> This let me define the columns contained in a zRow.
> I then defined a Class zTable, wich contains zRows.
> 
> Question:
> 
>         -  In my manage tabs, I needed to have a tab "Define columns".  To
> achieve this, I inserted a ZRow Instance (with id "Definition") in my zTable
> product definition, and a method called "Define_Columns", containing:
> 

Perhaps it is a better idea to assign the Define_Columns in the Views of
you zTable zclass definition (it is a separate tab in the management
interface there). You can assign any tab name there to any method in you
zclass. 

But I'm not sure I understand this correctly


> <dtml-with Definition>
>   <dtml-var manage_main>
> </dtml-with>
> 
>         And I defined a view "Define Columns" pointing to that method.  When
> i click on the "Define Columns", I can see the manage screen of the instance
> "Definition", that's what I wanted.
> 
>         But when I try to add a zField to "Definition" instance, the zField
> instance is created at the zTable level,
> not IN "Definition" instance!  All the classes are derived from on
> CatalogAware, ObjectManager.

Are they by any chance nested ZClasses? If so, this is a known problem.
If not, it is not entirely clear what you're doing. In general, if you
create a ZClass instance to make it appear in the target you intend, it
is important to do so through calling it through a
manage_addProduct['yourclass'].<yourclass>_factory and _not_ directly
through the <yourclass>_add method.

But once again, it is not entirely clear to me what you try to do

> 
>         I HAVE to deliver the product for the end of the week, so PLEASE
> help me!


hth

Rik