[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Gtk2::Simple::* example/sample code
- From: Carl Nygard <cjnygard fast net>
- To: "A. Pagaltzis" <pagaltzis gmx de>
- Cc: gtk-perl-list gnome org
- Subject: Re: Gtk2::Simple::* example/sample code
- Date: Tue, 30 Mar 2004 03:23:04 -0500
On Tue, 2004-03-30 at 08:49, A. Pagaltzis wrote:
> * Carl Nygard <cjnygard fast net> [2004-03-30 14:53]:
> > Not bored;) Started with tied version. Then realized that the
> > tied vars depend on the widgets being around and the var still
> > hooked to the widget. My app has many instances of common set
> > of data, and the different instances get swapped in and out to
> > allow editing. untie states that the original value of the var
> > gets restored upon untie, so swapping a new struct into place
> > blows the old away. Hence the bind version, which stores
> > modifications as they happen.
>
> In the case of SimpleList, it works because the tied thing is
> separate from the widget. I think all SimpleFoo widgets *should*
> be implemented in this fashion; and really, that's what your
> bound version does, conceptually.
>
> Thinking out loud from here on..
>
> It would probably be best if there is one class that represents a
> scalar and one for an array, both with a standard interface for
> SimpleFoo widgets, where the widget attaches itself as a listener
> for changes and also knows how to update the data store on
> change.
To summarize, I think you're talking about implementing the equivalent
of the TreeModel/TreeStore for regular widgets. Correct? That
definitely sounds like derived widgets to me.
Regards,
Carl
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]