EntryCompletion woes (maybe?)

Hi all,

I'm slowly building up my MultiEntryForm widget, and I wanted to add an EntryCompletion to any ComboBoxEntries within it so that you don't necessarily have to drop down the menu to find suggested values.

Unfortunately there's been some strange behaviour since I added it - namely if I try to delete a row _after text has been entered into a combo box entry_ I get:

Gtk-CRITICAL **: gtk_entry_get_text: assertion `GTK_IS_ENTRY (entry)' failed at -e line 1.

which I've tracked down to the EntryCompletions.

Attached is my (so far incomplete) widget package. To show the problem, do the following:

use lib '/path/to/My/MEF.pm';
use Gtk2 -init;
use My::MEF;

my $mw = Gtk2::Window->new("toplevel");
my $mef = My::MEF->new('c', 0, [10, 20, 30]);
$mef->mirror([10], [20], [30]);

Once it's running hit one of the close buttons (not the one for the last row though - I'm not sure why, but that one still works).


If you then go into MEF.pm and comment out lines 255 to 261, 391, 392, 396 and 397 (between the PROBLEM CODE comments) - ie remove the creation/modification of the EntryCompletion's - and repeat the process all is good again.

I assume I'm supposed to remove the EntryCompletion from the Entry or something, but $entry->set_completion(undef) doesn't work :( Any help would be greatly appreciated.

Oh yeah, and the completion component is sort of required for my users sadly, so I'm hoping I don't have to just drop it....


Attachment: MEF.pm
Description: Binary data

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