2.8.0 Gtk2: Assert on wxListBox::SetString()

Thomas Zehbe tz at ingenion.de
Thu Apr 12 07:53:19 PDT 2007


Am Donnerstag, 12. April 2007 15:58 schrieb Vadim Zeitlin:
>
>  This is because you get an event for the item -1 being selected. If you
> insert a "if ( sel != -1 )" test before calling SetString() the program
> works just as expected.
Thanks! Didn't realize that a second event was generated. Inserted the test an 
now it works. Great.
>
>  Of course, ideally, there should be no selection changed events generated
> just by calling SetString() (currently there are some because SetString()
> deletes the old string and then inserts the new one) and I'll try to fix
> this in HEAD but you can easily work around this problem by just testing if
> the selection is valid.
Indeed. Thanks again.
Thomas

>
>  Regards,
> VZ

-- 
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
www.ingenion.de




More information about the wx-users mailing list