On Sun, Mar 16, 2014 at 4:36 AM, Reinhard Engel
<[email protected]> wrote:
> If I execute the script
>
> def callback(*args,**keys):
>     g.trace()
>
> fileMenu = c.frame.menu.getMenu('File')
>
> # 3 is the position in the menu.  Other kinds of indices are possible.
> fileMenu.insert(3,'command',label='Test2',command=callback)
>
>
> from this FAQ I'm getting the following error message:
>
> exception executing script
> AttributeError: 'int' object has no attribute 'lower'
> --------------------
>   line 1109:
> * line 1110:         return ''.join([ch for ch in name.lower() if
> ch.isalnum()])
>   line 1111:
>   line 1112:     def canonicalizeTranslatedMenuName (self,name):
>
> Why?

Presumably because in the code at line 1110 the var ch is bound to 3.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to