Re: RadioItems / ItemFactory



On Sun, 2004-04-18 at 12:38, Jens Luedicke wrote:
Hi ...

I want to connect two RadioItems into a group:

my $i1 = $item_factory->get_item("/foo/bar");
my $i2 = $item_factory->get_item("/foo/blub");

$i1->set_group('Modes');
$i2->set_group('Modes');

$i1->set_active(1);
$i2->set_active(0);

It doesn't work, because $i1 isn't a Gtk2::RadioMenuItem

i assume in the call to the item factory bar and blur have: item_type 
=> '<RadioItem>'.

on which call does it fail, set_group or set_active? what is $i1, print
''.ref $1."\n"? in the past i've use the path of the first menu item,
see SimpleList.pm, for the the grouid and that has worked. 

-rm




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