2009/12/31 Jon Cruz <jon@...18...>:
yes... But the point of the verb mechanism is to support generic functionality decoupled from the input source it came from. These include:
- User clicking in the GUI
- Command-line invoking functionality
- DBus invoked functionality
- Live extension invoked functionality.
Using verbs as a quasi-binding to internal API feels wrong to me. We should have a clearly defined internal API decoupled from the UI which is usable from each of those contexts, then we wouldn't need to pass parameters to verbs or do any other kind of weird and ugly stuff.
I also note that "Command-line invoking functionality" is ambiguous. If this relates to scripting Inkscape, then that would be covered by DBus bindings and a convenience Python library that uses them. If it's about export options accessible from the command line, then the internal API could trivially be used to implement them.
I think a common problem we have in many places is that useful functionality is hidden in obscure functions with poorly defined interface, because whoever wrote them didn't have the courage to modify core classes, and instead tucked away his code in his own file. (I was severely affected by this when redoing the clipboard.) For example, resizing the page, pasting one SVG document into another, and removing unused defs and other invisible objects should all be methods of SPDocument.
Regards, Krzysztof