Re: RFC: Gtk2::SimpleComboBox



A. Pagaltzis wrote:
* muppet <scott asofyet org> [2004-03-29 05:27]:

Would it make things a little nicer to have a tied list model,
and use that in both SimpleList and SimpleComboBox?


That would definitely be worth having.

In fact it would probably be so useful as to obsolete SimpleList
for anything than completely trivial stuff, as that's the real
tedium. Connecting the model and the view is an effort hardly
worth mentioning.

Yes, I completely agree. I mostly copied SimpleList anyway. Then Simple{List,ComboBox,whatever} could just be composed of methods.

I kind of modified what I stole from SimpleList though; instead of tying a row and then tying a list of rows (TiedRow/TiedList) I just tied a column. If I had taken the Row/List method then wouldn't I have had to had done something like this?

@{$cb->{data}} = (
                  [selection1],
                  [selection2],
                  [selection3],
                 );

My aim was so that I could just transform the column into a row of sorts and do

@{$cb-{data}} = qw/sel1 sel2 sel3/;

Although I suppose that could be worked out in the SimpleListStore or whatever.

James



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