Re: [Zope3-Users] Non-owning references in Zope3

2006-05-24 Thread Alek Kowalczyk




Tom Dossis wrote:

  [EMAIL PROTECTED] wrote:
  
  
Hi,

I am relatively new to Zope3. I could not find anywhere an example,
what is the 'right way' to make non-owning reference to another
object in Zope? Every piece of zope3 docs is full of examples of
containers, this makes a good tree like structure. But how to refer
from one object to another in right way? Can/should I do that with
Object field?

  
  
One offering is zc.extrinsicreference ...
http://svn.zope.org/zc.extrinsicreference/trunk/src/zc/extrinsicreference/extrinsicreference.txt

I'm not aware of any zope.schema / FieldProperty stuff to do this; it
would be pretty useful though.
  

Thanks! I have also found a references library in 'schooltool' project.
It seems to be similar to RDF and adapts any Annotatable object. But
I'm looking for something more straightforward - both approaches
(extrinct and schooltool) seem to be too complex and not pythonic...





___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Non-owning references in Zope3

2006-05-24 Thread Gary Poster


On May 24, 2006, at 4:27 PM, Alek Kowalczyk wrote:


Tom Dossis wrote:

[EMAIL PROTECTED] wrote:
Hi, I am relatively new to Zope3. I could not find anywhere an  
example, what is the 'right way' to make non-owning reference to  
another object in Zope? Every piece of zope3 docs is full of  
examples of containers, this makes a good tree like structure.  
But how to refer from one object to another in right way? Can/ 
should I do that with Object field?
One offering is zc.extrinsicreference ... http://svn.zope.org/ 
zc.extrinsicreference/trunk/src/zc/extrinsicreference/ 
extrinsicreference.txt I'm not aware of any zope.schema /  
FieldProperty stuff to do this; it would be pretty useful though.
Thanks! I have also found a references library in 'schooltool'  
project. It seems to be similar to RDF and adapts any Annotatable  
object. But I'm looking for something more straightforward - both  
approaches (extrinct and schooltool) seem to be too complex and not  
pythonic...


It sounds like you just want to make python references?  That works.

given A and B, two objects whose classes inherit from  
persistent.Persistent,


A.foo = B

and

B.bar = A

will work as you expect.  Haven't seen clear requirements for this  
from you, but maybe I missed them.


Gary
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


[Zope3-Users] Non-owning references in Zope3

2006-05-22 Thread thealx
Hi,

I am relatively new to Zope3. I could not find anywhere an example, what is the 
'right way' to make non-owning reference to another object in Zope?  
Every piece of zope3 docs is full of examples of containers, this makes a good 
tree like structure. But how to refer from one object to another in right way?
Can/should I do that with Object field? 
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] Non-owning references in Zope3

2006-05-22 Thread Tom Dossis
[EMAIL PROTECTED] wrote:
 Hi,
 
 I am relatively new to Zope3. I could not find anywhere an example,
 what is the 'right way' to make non-owning reference to another
 object in Zope? Every piece of zope3 docs is full of examples of
 containers, this makes a good tree like structure. But how to refer
 from one object to another in right way? Can/should I do that with
 Object field?

One offering is zc.extrinsicreference ...
http://svn.zope.org/zc.extrinsicreference/trunk/src/zc/extrinsicreference/extrinsicreference.txt

I'm not aware of any zope.schema / FieldProperty stuff to do this; it
would be pretty useful though.

___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users