[Zope-dev] Specialists and __bobo_traverse__
Phillip J. Eby
pje@telecommunity.com
Tue, 16 Jan 2001 12:55:57 -0500
It sounds to me like you're trying to have SkinScript supply a
bobo_traverse for the Specialist itself, and this you cannot do. (There
are other ways to change a Specialist's bobo_traverse behavior, but
SkinScript is not one of them.) The SkinScript you're doing is meaningful
only if you want to go to specialist/skin1/something, in which case your
traversal_method should be called to process "something".
I don't have the slightest idea what you're trying to accomplish here - I
probably missed the beginning of this thread. Do you want to change the
way the specialist processes the string "dataskin1", or the way dataskin1
processes the URL component that comes next? Each requires a different
approach.
At 07:28 PM 1/16/01 +0200, Roch'e Compaan wrote:
>I'm still lost as to when __bobo_traverse__ is checked for object traversal
>and when not.
>
>I have very simple piece of SkinScript: WITH SELF COMPUTE __bobo_traverse__
>= traversal_method. Looking at the traverse method in BaseRequest.py it
>looks to me as if an object is always checked if it has a __bobo_traverse__
>method but this is not what is happening.
>
>If I manually type in a url, say path.to.specialist/dataskin1, where
>dataskin1 exists, my traversal_method is not called. When I type in
>path.to.specialist/dataskin2, where dataskin2 does not exist then my
>traversal_method is called. Noticing that the traversal_method is called
>when an object can not be found I tried
>path.to.specialist/dataskin1/dataskin2, where dataskin1 is in the
>specialist's rack but dataskin2 is in another specialist's rack and will
>therefor not be found. In this case my traversal_method was not called. If
>it was then I could retrieve it from the appropriate specialist.
>
>I hope the above is clear because I'm somewhat desperate at the moment. If
>I'm trying the impossible, a simple "forget about it" will also do.
>