-----Original Message----- From: Nicolas Dufour [mailto:nicoduf@...48...] Sent: Tuesday, November 30, 2010 15:02 To: Inkscape Devel List Subject: [Inkscape-devel] Notebooks in internal extensions
Hello,
I'm currently trying to use a 3 tabs notebook in an internal extension (a filter with some options and two color selectors), but Inkscape crashes as soon as an ext->get_param_xxx function is called from the filter's code. Everything ext->works fine if I remove the notebook from the filter UI code.
These functions use the parameters list of the extension (see extension/extension.cpp, line 427+) to return the requested value. The problem is that this list, which is also used to create the UI, only contains the first level parameters, and when using a notebook, the notebook's parameters only (but not what's inside it). ParamNotebook (extension/param/notebook.cpp, line 64+) has it's own lists (one for each page), which are also used to create the pages' UI, and contain all the parameters that should be (but currently are not) accessible from the extension's get_param functions in order to make notebooks work as expected.
Since it's not possible to add the notebook's pages parameters to the extension's ones (it would break the UI), I plan to add a new private merged list in Extension::Extension and a public Extension::add_param function to allow parameters addition from the notebook code.
Could an extension expert (Ted, Johan?) advise me?
Hi Nicolas, Perhaps I can have a look at it this evening. I think the fix would be to have the get_param functions do something like a notebookparam->get_param if the extension's parameter is a ParamNotebook. (right?)
Ciao, Johan