I think the problem goes deeper than that. Zope 2.3x no longer allows the
setting or creation of any property called "title" for new ZClasses. Period
(At least, not in the same way it used to). Try it for yourself. If you
follow the steps in the "ZClass Properties" How-to
(http://www.zope.org/Members/lstaffor/zProperties), you'll find that Zope
2.3x gives a "The id 'title' is invalid--it is already in use" error when
you try to create a property called "title".

Fine, you say, it's already there by default, right?

Finish out the How-To, setting all the proper permissions, modifying the
addForm and the constructor to accomodate your other properties. Then try
creating an instance of your new class and setting the 'title' property
through the addForm. The title will not be set when you hit 'Add'. The field
will remain empty...

Of course, the How-To above worked just fine in 2.2.5. Doesn't work anymore.
There is no longer any default place to set the title in a new ZClass and
the title property cannot be set thru DTML. (Haven't tried it in Python yet)

Is this a bug or am I missing something?


>> I guessed it was something like this, so this leads me to two followup
>> questions.
>> 1) I'd be happy to use the built-in title property assuming that it
>>   won't cause some kind of problem.  I just don't know how I can set
>>   that in instance objects since it doesn't appear on the property
>>   sheet.  Can I modify the addForm and add methods for the class to
>>   set it there?  Do I need to make a custom view?  What approach do
>>   most people take in this situation, using the built-in title or
>>   choosing a different name for a title-like property?

> I use Title (note the upper-casity), and then I add a Python Mehtod (or in
> 2.3 a Python Script) called 'title' that simply does:
> return self.Title
>(or in a P.S.:
> return context.Title
> should do it

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to