Re: SimpleList redraw/refresh




On Jul 13, 2004, at 5:27 AM, A. Pagaltzis wrote:

* Ross McFarland <rwmcfa1 neces com> [2004-07-11 21:12]:
the only thing to watch out for is replacing the reference, i.e. don't do this:
        $categories->{data} = \ data;
because you'll lose the tie magic that is SimpleList.

This is discussed *so* often on the list. Is there no reasonable place which could check the 'data' value reference for having the right magic and throwing an error if it doesn't? If that message includes a pointer to the docs, then this question would probably cease.

that's probably feasible. i would've sworn we had a faq entry about it (but there isn't), and a little RTFMing would suffice (i've tried to be very polite about it), but yours is probably the best idea.


One thing that irks me about the interface, and which is also the source of these questions, is that it doesn't quite follow common tie() practice. I feel it would be better if the interface was something along the lines of

    tie my @sl, 'Gtk2::Ex::Simple::List';

i think the issue is that we wanted to keep the widget and the list together in one object. what you're proposing means that it's on the user to figure out and maintain which tied object goes with which simplelist, and how do you do that?


--
"Ghostbusters" is the best movie of this decade.
  -- Neal, circa 1996, referring to a movie released in 1984.




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