Something to triger




I have simple apps that search ldap and display in the SimpleList rows.
Basically, I want to display the main window _first_ then automatically put the search results into the rows.

Unfortunately, if I call populate_list before Gtk2->main, window will wait untill the search finished, if I put after Gtk2->main, it never called because it sit there waiting for events.

Any idea how to call populate_list 'automatically' without user input?

...
my $slist = Gtk2::SimpleList->new (
              'Name'     => 'text',
              'Address'     => 'text',
              'Extention'     => 'text',
           );

$window->add($slist);
$window->show_all;

#&populate_list();

Gtk2->main;


#############
sub populate_list {
  # do serach on ldap
  ...
  push @{$slist->{data}}, [ $name, $addrs, $ext ];

}



--

--beast




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