[Zope] Pointers in zope ??? object1 --> object2
NABETH Thierry
Thierry.NABETH@insead.fr
Tue, 20 Jun 2000 19:50:06 +0200
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01BFDADF.B2BF1976
Content-Type: text/plain;
charset="iso-8859-1"
Hello,
I am trying to figure out how I can find a way to implement pointers in
Zope.
In other words, I would like to be able that the content of an attribute
reference another object.
object1 --> object2
and say for instance: object1.aaa := object2
and then get this object with object1.aaa
I have spent a lot of time, looking for instance how the name space work.
I had thought for instance that I would create a string field in which I
would store
the id of the other object. But the problem, is that I do know how to get
the object from this id in the system, unless it belongs to the same
namespace.
I had also thought that I could store in this field, the url of the object.
From this url, I would then be able to get the object.
(since you can call an kind of method by <url-of-the-object>/<mymethod>)
But it didn't work.
For instance
<dtml-with <url-of-the-object>>
....
</dtml-with>
raise an error.
eventually, you can imagine that you can access an object specified in a
absulute way
by using """"plenty"""" of dtml-with.
for instance for accessing the /root/b/c/d/e object, we would use
<dtml-with root>
<dtml-with b>
<dtml-with c>
<dtml-with d>
<dtml-with e>
</dtml-with>
</dtml-with>
</dtml-with>
</dtml-with>
</dtml-with>
But really this is too complicate, and really can not be implemented.
Do you know an answer to this question.
I can not believe that this is not possible, given the OO approach of zope,
and the fact that it relies on python.
Thanks,
Thierry Nabeth
Research Fellow
INSEAD CALT (the Centre for Advanced Learning Technologies)
<http://www.insead.fr/CALT/>
------_=_NextPart_001_01BFDADF.B2BF1976
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>Pointers in zope ??? object1 --> object2</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">Hello,</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I am trying to figure out how I can =
find a way to implement pointers in Zope.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">In other words, I would like to be =
able that the content of an attribute reference another object.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> object1 --> object2</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">and say for instance: object1.aaa =
:=3D object2</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">and then get this object with =
object1.aaa </FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">I have spent a lot of time, looking =
for instance how the name space work.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I had thought for instance that I =
would create a string field in which I would store</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">the id of the other object. But the =
problem, is that I do know how to get</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">the object from this id in the =
system, unless it belongs to the same namespace.</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I had also thought that I could store =
in this field, the url of the object.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">From this url, I would then be able =
to get the object.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">(since you can call an kind of method =
by <url-of-the-object>/<mymethod>)</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">But it didn't work.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">For instance</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"><dtml-with =
<url-of-the-object>></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> ....</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"></dtml-with></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">raise an error.</FONT>
</P>
<BR>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">eventually, you can imagine that you =
can access an object specified in a absulute way</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">by using =
""""plenty"""" of =
dtml-with.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">for instance for accessing the =
/root/b/c/d/e object, we would use</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"><dtml-with root></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> <dtml-with b></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> <dtml-with =
c></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
<dtml-with d></FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> =
<dtml-with e></FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> &nb=
sp; </dtml-with></FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial"> =
</dtml-with></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
</dtml-with></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"> =
</dtml-with></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial"></dtml-with></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">But really this is too complicate, and =
really can not be implemented.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Do you know an answer to this =
question.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">I can not believe that this is not =
possible, given the OO approach of zope, and the fact that it relies on =
python.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Arial">Thierry Nabeth</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Research Fellow</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">INSEAD CALT (the Centre for Advanced =
Learning Technologies)</FONT>
<BR><U><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial"><<A =
HREF=3D"http://www.insead.fr/CALT/" =
TARGET=3D"_blank">http://www.insead.fr/CALT/</A>></FONT></U>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01BFDADF.B2BF1976--