RE: [Zope] Pointers in zope ??? object1 --> object2 ==> "REQUEST.resolve_url('my_url')"

2000-06-21 Thread NABETH Thierry
Title: RE: [Zope] Pointers in zope ???  object1 --> object2   ==>  "REQUEST.resolve_url('my_url')"





Thank you David,


I really would have had difficulties finding it myself.




http://zope-server/path to the object')">
  


  Error in resolve_url: unable to get the object from the url.
  does the url matches the REQUEST.script:  ?






Note:
In the resolve url, you have to be carefull that
zope-server is exactly the same as the machine name.
More specifically zope-server has to be the same as REQUEST.script
or it will generate an error.



Thierry Nabeth
Research Fellow
INSEAD CALT (the Centre for Advanced Learning Technologies)
http://www.insead.fr/CALT/



-Original Message-
From: R. David Murray [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 20, 2000 9:22 PM
To: NABETH Thierry
Subject: RE: [Zope] Pointers in zope ??? object1 --> object2



On Tue, 20 Jun 2000, NABETH Thierry wrote:
> Please, let me know if you remember of anything that could help me
> to identify the way to get the object from an url.


Looks like it's 'REQUEST.resolve_url()'.


--RDM





Re: [Zope] Pointers in zope ??? object1 --> object2

2000-06-20 Thread R. David Murray

On Tue, 20 Jun 2000, NABETH Thierry wrote:
> 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  /)
> But it didn't work.
> For instance
> >
>
> 
> raise an error.

There's a method on REQUEST that takes an absolute URL and gives you
back the object.  Check the ZQR.

--RDM


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Pointers in zope ??? object1 --> object2

2000-06-20 Thread NABETH Thierry
Title: Pointers in zope ???  object1 --> object2





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  /)
But it didn't work.
For instance
>
   

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

  
    
  
  
   
    
 
   



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)