Warning when setting a combo's model



Hi all.

I'm cleaning up warnings in various places, and one that I can't figure
out happens when switching a combo's model. ïWhen I build a model that
has no data ( ie when I base the model on stuff from a database, and
there's no data returned ), I get:

Gtk-CRITICAL **: gtk_combo_box_entry_set_text_column: assertion
`entry_box->priv->text_column == -1'

 ... when I do:

my $model = Gtk2::ListStore->new( 'Glib::Int', 'Glib::String' );
$combo->set_model( $model ); # <== error happens at this point
$combo->set_text_column( 1 ); #  ... not at this point

 ... and then repeat the above. That is, it *doesn't* happen the first
time, but happens all subsequent times.

I've tried writing a small app that demonstrates the problem, and the
damned thing *doesn't* give the above warning ... it works perfectly
without any errors :-/

I'm attaching it anyway, to give an idea of what I'm doing, but again,
note that this *doesn't* throw the warning that I'm getting in larger
apps - I don't know why.

Any ideas?

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2
9922 7989
email: dkasak nusconsulting com au
website:
http://www.nusconsulting.com.au

Attachment: combo_change_model.pl
Description: Perl program



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