On Tue, 29 Jun 2004 22:15:17 +0200, Krisztian VASAS wrote:
>
> Well, now works quiet well, but I have another problem and I can't
> decide what's the problem...
[...]
> I've tried to reduce the program to the smallest amount code that still
> triggers the problem and looks like this is Gtk2's (?) fault.
>
> Here's the code: http://www.nomorepasting.com/paste.php?pasteID=15366
When I run that code, I get:
2) poerbook:~/projects/support% perl gtk2-client.perl
Bareword "menuitem_quit" not allowed while "strict subs" in use \
at gtk2-client.perl line 73.
BEGIN not safe after errors--compilation aborted \
at gtk2-client.perl line 243.
After I changed line 73 to be
$window->signal_connect("destroy", \&menuitem_quit );
I started getting these errors:
Gtk-WARNING **: gtk_item_factory_create_item(): Can't specify a \
callback on a branch: "/_File" at gtk2-client.perl line 85.
Gtk-WARNING **: gtk_item_factory_create_item(): Can't specify a \
callback on a branch: "/_Settings" at gtk2-client.perl line 85.
Gtk-WARNING **: gtk_item_factory_create_item(): Can't specify a \
callback on a branch: "/_Help" at gtk2-client.perl line 85.
Fontconfig error: Cannot load default config file
2 -> login (from gtk2-client.perl at 132)
2 -> _stop (from \
/Users/troc/projects/poe/poe/lib/POE/Resource/Sessions.pm at 492)
The Gtk-WARNING lines say you're not setting up @menu_items correctly.
Sure enough, they go away when I replace the 0 callbacks with undef.
The \&loginablak callback for "<control>N" should probably be
$session->postback("login") instead. The program doesn't immediately
exit when I change it here, but it also doesn't connect to a server when
I try that.
Line 203 reads
$session->postback("ar_conn")
You probably should add this to gui_start()
$kernel->alias_set("gui");
and then replace line 203 with
$poe_kernel->post("gui", "ar_conn");
.... and that makes the [Ok] button connect to the server.
I have placed an updated version of your script at
http://www.nomorepasting.com/paste.php?pasteID=15396
Have fun!
--
Rocco Caputo -
http://poe.perl.org/