Re: simple question



muppet wrote:

On May 31, 2006, at 6:55 AM, Beast wrote:

How do I get last(max) index of SimpleList data?

Normally.  :-)

With a normal array, it's

  @ary   =>   $#ary

Yup, thanks. I've just figure out few minutes ago ;=p

Now I have another problem:

I have 2 SimpleList

[ SL1  ]    [<<]   [SL2]
[>>] Basically button "<<" (add) and ">>" (remove) is used to move item from SL1 to SL2 and vice versa.
When item in SL1 is selected, ">>" is active and "<<" become inactive.

$self->{sl1}->signal_connect( cursor_changed => sub {
               $self->{sl2}->get_selection->unselect_all;
       $bt_rem->set_sensitive(TRUE);
       $bt_add->set_sensitive(FALSE);
       ...
}

The problem is "cursor_changed" did not react when I select item internally (without using mouse).

my @max = @{$self->{sl1}->{data}};
$self->{sl1}->select($#max);










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