Re: A little tie magic

On man, 2003-12-08 at 07:51, A. Pagaltzis wrote:
* Bjarne Steinsbø <bosteins broadpark no> [2003-12-07 18:37]:
1) Is there enough interest in this that the powers that be
should be requested to include it in the core Gtk2
2) Is this the way the interface should work?  Any better
3) Would it be OK to document Gtk2::BindVariable as such, even
though at least one additional method will be compiled into
each and every Gtk2 'client' class?

I don't see why this has to be a Gtk2-specific module. Instead of
having all the widgets support ties, you should implement a
change-notifying scalar using the tie mechnism along these lines: 

But this only works one way. With the hack provided by Bjarne, the perl
variable reflects changes done on the widget side. As well as
propagating changes to the variable to the widget.


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