[Zope] ZClass Confusion over object id
Brian K. Holdsworth
bhold@awod.com
Mon, 17 Jan 2000 16:44:37 -0500
Thanks for the assistance Alexandre and Tres. Your suggestion did the
trick.
It seems a little odd that this appeared in 2.0.1 and is still around in
2.1.2. Does anyone know if a fix has been considered. It seems it would be
pretty easy to just change the default 'add' method that gets created when a
ZClass is created and avoid this pitfall. I'd volunteer to look at it, but
I'm sure a more elegant solution can be thought of by those more experienced
with Zope than I.
Best Regards,
Brian Holdsworth
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Alexandre Ratti
Sent: Monday, January 17, 2000 9:44 AM
To: zope@zope.org
Cc: Brian K. Holdsworth
Subject: Re: [Zope] ZClass Confusion over object id
Hi Brian,
This sounds like the DTML ZClass ID bug. Take a look at this doc:
<http://www.zope.org/Members/AlexR/ZClassIDBug>
HTH.
Alexandre
At 12:00 16/01/2000 -0800, you wrote:
>Reply-To: <bhold@awod.com>
>From: "Brian K. Holdsworth" <bhold@awod.com>
>To: <zope@zope.org>
>Subject: [Zope] ZClass Confusion over object id
>Date: Sun, 16 Jan 2000 13:09:53 -0500
>charset="iso-8859-1"
>
>I have embarked on my first effort to create a custom ZClass for a site I
am
>building. It almost works! The problem has something to do with the way
>the object "id" gets created when I make an instance of my custom ZClass.
I
>am using Zope 2.1.2 and my ZClass inherits from DTML Document. I upgraded
>to the latest version hoping it would fix the problem. It didn't, so I
>assume now that I am doing something wrong.
<snip>
>The basic problem is that when I create an instance, the "id" property ends
>up blank! I see the object in the manage GUI with its id, but when I try
to
>access the "id" of the instance in DTML, I get a value of "<string>"
instead
>of the id I assigned. The other properties, like title and author, get
>created correctly. The edit page for the new object instance (it is a
>sub-class of DTML Document) also displays a blank id.
>
>Any clues???
>
>Brian Holdsworth
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )