On May 10, 2006, at 5:29 PM, [EMAIL PROTECTED] wrote:
I'm a little surprised that sorting the Listbox would call the Change
event handler; are you sorting using Listbox.Sort?
THanks for your suggestion Charles. I'll try to implement it.
Yes, I am using Listbox.sort. And from going through the debugger
it seems to
be the line which is firing the change event.
Indeed it is; I just tested it. This doesn't seem like the right
behavior to me.
Seth wrote :
I noticed that when I change an item in a listbox, the change
event is
getting fired multiple times because I am redrawing the list,
sorting, etc. I want
to make it sort without firing the change event.
Ahhh the wonders of a truly backwards system. ;^)
(Backwards as opposed to not storing the data in the control and
actually just having the control _display_ the data)
I am not sure if my approach is backwards or not, but I have some
interlocking arrays of data which are used in different ways, and
so I keep the data
internal and then display only a portion of it depending on the
circumstances. In
fact, the user can filter the data in various ways. (E.g. show only
fulltime
employees, or parttime employees, or all employees, or those working
overtime, etc). This makes it easier to manage large lists of data
by looking at
subsets.
Your approach is not backward; it's a consequence of using the Rb
Listbox. Seth is under the influence of Cocoa and its use of MVC; it
will wear off eventually.
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>