> But are you suggesting different names for different decorators?
All per-class decorators will look like @cmd('command-name')
The @g.command decorator will remain unchanged. It's for functions, not
methods.
> Have to admit I've lost track of which problem you're trying to solve
The problem is discovering the proper 'self' argument to pass to the
decorated function (unbound method). Usually, this is no problem, code
just calls the function/method.
But here, the function is retrieved from c.commandsDict, so *Leo doesn't
know the instance*. As a result, the decorator must know. In the old way,
the entries in the getPublicCommands tables were *bound *methods, so the
problem didn't arise.
Edward
>
--
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.