acquisition question
Is there any reason why, if my parent can acquire something a few levels up, I might not be able to? Here's the story: I'm trying to acquire various objects in a root directory; let's call 2 of them them Banana and Kiwi. I'm trying to acquire them from several folders deep. I can't aquire one of them at all, although it appears to be identical in most important aspects to the other. For example, fruit = aq_get(context, 'Pineapple', default, 1) will return the Yellow Spikey Fruit; but fruit = aq_get(context, 'Kiwi', default, 1) will return None. However, if I do fruit = aq_get(context.aq_parent, 'Kiwi', default, 1) I get my Hairy Egg-sized Fruit as expected. What kind of thing should I be looking for in order to identify what's going on here? I can't debug it because the Acquision code is in C, and I'm a C dunce. Cheers for any ideas, seb
seb bacon writes:
....; but
fruit = aq_get(context, 'Kiwi', default, 1)
will return None. However, if I do
fruit = aq_get(context.aq_parent, 'Kiwi', default, 1)
I get my Hairy Egg-sized Fruit as expected. This may be possible, if your "context" involves an "Acquisition.Explicit" object, such as e.g. a DTML document.
However, it would be unclear, why you 'Pineapple' works then. You know Shane's "showaq" method? It allows you to display the acquisition structure. This may help to understand the observations. Dieter
participants (2)
-
Dieter Maurer -
seb bacon