"Ross" == Ross McFarland <rwmcfa1 neces com> writes:
Ross> preliminary test releases:
Ross> http://www.neces.com/gtk2-perl/Gtk2-Ex-Simple-List-0.30.tar.gz
Ross> http://www.neces.com/gtk2-perl/Gtk2-Ex-Simple-Tree-0.30.tar.gz
Installed.
Ross> take a look,
Done :o)
Ross> report back.
Thanks a lot. It was a great help to understand how the MVC
paradigm was used.
'get_selected_indices' is not implemented in Simple::Tree.
This can be reproduced by pressing the Ok button.
On a different topic, I have defined a new CellRenderer:
CellRendererTextCompletion, derived from CellRendererText which
implements completion functionality.
For that, I need to specify a completion model for each column
using this renderer. But the interface of Simple::(List::Tree)
does not allow parameters for renderers. So I have to build the
Simple::(L|T), access the renderer and set the completion model.
I have tried various approaches :
- define a property for the renderer. Looks like only columns can
be used. In the case of a completion, this is inadequate.
- try to define a 'new' subroutine. Can't get it to work, I don't
understand why S::(L|T) can inherit from Gtk2::TreeView via a
simple ISA but CellRendererText insist on using the
Glib::Object::Subclass mechanism. Anyway as SLT only provide a
way to define the *type* of the renderer and not an instance or
a sub returning an instance of a renderer, I also abandon that
approach.
In the end, I just build an SLT, access the renderer, set the
completion model, and associate it to the underlying Entry widget
in START_EDITING. I just wonder if things can be done more
efficiently.
Anyway, I include my actual package and will hear with humility
every remark from the list.
Thanks again for your work and in advance for your remarks :o)
Vincent
Attachment:
CellRendererTextCompletion.pm
Description: Perl program