[Zope-dev] Next Step to Bug Resolution???

Tim Cook timothywayne.cook at gmail.com
Fri Jan 16 05:37:01 EST 2009


On Mon, 2009-01-12 at 22:05 +0100, Martijn Faassen wrote:

> Okay, I'll take another look then and look at ObjectRef. Ah, yes, Dan 
> pointed out to you that you are using a zope.schema.Field in a class 
> instead of in a schema (an interface). That isn't right, and since the 
> direct use of that causes an error, that looks suspicious. Whether it is 
> the cause of the bug or not I do not know.

Thanks to all for the help.  
I will put together a wiki page that chronicles and explains the entire
issue and process of getting here. Along with the simplest example I can
come up with.

I'm still a little confused about why using Field as a base class is
wrong.  I know that it wasn't it's original purpose but here is the
situation.

I originally inherited from 'object' in my base classes and from
Interface in their associated interfaces.

But, because many of the base classes (and their schemas) are required
to define attributes of other classes. I  found that I did not have the
meta-data attributes such as required, default, etc for those schemas to
represent the attributes in the latter schemas.  So I chose to inherit
from IField and Field in my bases so that I inherited.  

Now maybe there is a MUCH more appropriate way to build these OSHIP base
classes than inheriting from Field.  But in mid-2007 I searched hi and
lo and asked on the mailing lists and still do not have a better
solution.   

So if someone can tell me where I can find the documentation/examples
for building your own schemas that will be validated then I'll re-factor
the entire application to make it right.

Cheers,
Tim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: oe_trick.png
Type: image/png
Size: 7092 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20090116/717d43b2/attachment.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20090116/717d43b2/attachment.bin 


More information about the Zope-Dev mailing list