On Apr 14, 9:43 pm, "Alex Polite" <[EMAIL PROTECTED]> wrote:
> 2008/4/13, bobjack <[EMAIL PROTECTED]>:
>
>
>
> > Hi Alex,
>
> > Yes there is a testAtPopup.leo in the leo/test folder which contains
> > examples of how to use @popup menus. @popup menus translate directly
> > to rClick menus.
>
> Ok, I've been fooling around with this a bit. I can get the basic
> stuff to work but I can't do dynamically generated menus.
>
> I tried something like this:
>
> <snip>
> def more_menu_items(keywords):
> # A very static "dyanamic menu" just for testing
> return [("|", None)]
>
> c.context_menus['iconbox'] = [
> ('*', more_menu_items),
> ]
> </snip>
>
> But when I rclick an iconbox I just get the default context menu?
> What's the deal here? Might it be that the more_menu_items function
> isn't in the namespace when leo tries to call it? Or is it that it
> returns something leo can't use and it falls back to the default menu?
>
> alex
>
> g.es('replaced lofg menu', color='blue')
>
> --http://polite.se
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en
-~----------~----~----~----~------~----~------~--~---