Re: Gtk2::SimpleList->new_from_widget (was Re: An automatic signal stub function generator)



On Friday, September 19, 2003, at 01:33 PM, Dan Lyke wrote:

muppet writes:
this was actually really easy.

i implemented it as Gtk2::SimpleList->new_from_widget ($widget, key =>
val, ...);

Cool! I'll have to patch my system (working from the '.deb's right
now).

well, careful with that --- i forgot to label the message an RFC. ross pointed out to me that new_from_widget is a pretty dumb name, since we can't work on just any old widget; it should be new_from_treeview.


Does the Gtk2::SimpleList need to know anything about the widget, or should it just be associated with the GtkTreeStore? The purpose of the whole MVC split seems to be to allow multiple tree widgets to view the same tree store, and if I'm understanding this right the SimpleList should really conceptually be controlling just the GtkTreeStore?

i think you mean GtkListStore.  SimpleList doesn't work with TreeStores.

SimpleList is designed to be simple. doing things like having multiple views on the same model is not simple, you see. the point behind SimpleList is to make it easy to toss a single-column list of strings into a dialog box and other such common tasks for which a flexible, full-featured MVC architecture merely results in an annoying amount of work.

it's not particularly ideal, which is why SimpleList doesn't try to proxy all the functionality of treeview and friends. if you need the full-featured stuff, you need to take off the training wheels. :-)


i had considered at one point creating a custom GtkTreeModel for the perl bindings, so that you could treat TreeModels as native perl data structures (using ties, etc). i suppose we could strip that tied array stuff out of SimpleList and use it separately...


(For memory reasons I don't think I'll be able to use the SimpleList for the application I'm diddling with, so it's a good thing that I'm struggling with the GtkTreeStore stuff early, and feel free to ignore my queries until I'm actually offering patches for submission.)

what kind of memory reasons? SimpleList uses tied arrays so that it doesn't need to store its own copy of the data. in terms of storage, it should be every bit as efficient as using ListStore and TreeView directly.


Aaaand, that takes me more towards: Is it okay to talk about Gtk+ issues in general in the context of Gtk2-perl here, or would y'all rather not be cluttered with that?

i don't mind, so long as you're not talking about it in the context of a c program and nothing else. sorry, i should say "just don't talk about python!" there. i made my joke. *cough*


--
muppet <scott at asofyet dot org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]