[Zope] new External Methods not recognized

Richard Deeley r_deeley@yahoo.com
Mon, 12 Aug 2002 18:54:30 -0700 (PDT)


Got it... After reinstalling the whole thing on another machine,
I still could not get ExternalMethods to work. I also found
a discrepancy on the help pages. On the searchReplaceStr example
there is no 'self' parameter. On the main page, seems to suggest
there really ought to be one. So this is confusing.

But I digress. There appears to be an 8 character limit issue
floating around. Methods will work fine as far as I can tell
if (and only if) the ID is kept to less than 8 characters.
The function name, I think can be longer, as the original
example is searchReplaceStr and I got that to work on one
occaision. (This is Win98SE os, btw).

Once you get a long ID in there, things get messy. I tried
to redefine one back to normality by adding in a new method
using a shorter ID. But no luck there. I think that function
name is now toast for eternity.

Is there a rule that IDs must be less than 8 characters ?
(wasn't in the section on ExternalMethods, but possibly
it is documented elsewhere as a generic rule).
(ie is this all my fault for missing it in the manual)

Any clarifications appreciated.

Thanks.


--- Dieter Maurer <dieter@handshake.de> wrote:
> Richard Deeley writes:
>  > Summary: Cannot access new External Methods, olds ones OK.
>  > 
>  > (Zope 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32)
>  > 
>  > ...
>  > I can redefine the old methods to use new functions.
>  > I can create and test new External Methods. What I can't do is 
>  > call any methods from DTML using newly created ExternalMethods. 
>  > This generates a name error.
> Thus, you can create the External Method, manage it, call its "Test"
> tab but you cannot use it from DTML. When you try, you
> get a "Error type: NameError; Error value: your_External_Method", right?
> 
>    Are you sure, the DTML object is called correctly (its two positional
>    arguments passed correctly)?
> 
>    Did you check the External Method's "Permission" tab?
>    Sometimes, magic resets some permissions and Zope sometimes
>    maps "Unauthorized" to "AttributeError".
> 
> 
> Dieter


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com