Fw: [PHP-GTK-DEV] Fw: Funky new error message - win32 only I *think*
| From: | Steph | Date: | Sat, 29 Dec 2001 16:41:26 +0000 |
| Subject: | Fw: [PHP-GTK-DEV] Fw: Funky new error message - win32 only I *think* | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-307@lists.php.net to get a copy of this message | ||
Sorry chaps, but I'm getting that self-same error when the 'move-current' signal is
emitted too. I can only get this signal to fire *at all* using arrow keys, which is weird cos
it's not bound to keys (the other signal was).
Test script below because I'm due back at work in 5 minutes and don't want to fight with
attachments not working ;) Please could someone run it on *nix and say whether the program aborts
when running through the 'File' menu with arrow keys there too?
- scuse scrappiness, I've used the same couple of scripts for all menushell function and signal
testing so they're all over the place - oh and ps, if anyone can figure what the smeg
'move-current' signal is *supposed* to do and when it's meant to fire, I'll buy
them sweeties :)
<?
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) ||
die("Can't load php_gtk module!\n");
function exit_selected() {
echo "'Exit' was selected from the menu.\n";
gtk::main_quit();
}
function test_selected() {
echo "'Test' was selected from the menu.\n";
flush();
}
$window = &new GtkWindow();
$window->set_uposition(10, 10);
$window->set_usize((gdk::screen_width()-20), 25);
$window->connect_object('destroy', array('gtk', 'main_quit'));
$menubar = &new GtkMenuBar();
$window->add($menubar);
$header1 = &new GtkMenuItem("File");
$menubar->insert($header1, 1);
$header2 = &new GtkMenuItem("Edit");
$menubar->insert($header2, 2);
$header3 = &new GtkMenuItem("Test");
//$header3->connect("activate","test_selected");
$menubar->insert($header3, 0);
//$menubar->activate_item($header3, false);
$filemenu = &new GtkMenu();
$open = &new GtkMenuItem("Open");
$filemenu->append($open);
$save = &new GtkMenuItem("Save");
$filemenu->append($save);
$separator = &new GtkMenuItem();
$filemenu->append($separator);
$exit = &new GtkMenuItem("Exit");
$exit->connect("activate","exit_selected");
$filemenu->append($exit);
$test = &new GtkMenuItem("Test");
$filemenu->append($test);
//$test->connect("select","test_selected");
$filemenu->connect('move-current', 'test_selected', GTK_MENU_DIR_NEXT);
//$filemenu->connect('activate-current', 'test_selected', true);
$moremenu = &new GtkMenu();
$more = &new GtkMenuItem('More..');
$moremenu->append($more);
$test->set_submenu($moremenu);
$header1->set_submenu($filemenu);
$window->show_all();
gtk::main();
?>
----- Original Message -----
From: "Steph" <Steph.Fox@btinternet.com>
To: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
Sent: Saturday, December 29, 2001 1:21 PM
Subject: [PHP-GTK-DEV] Fw: Funky new error message - win32 only I *think*
PS this error even happens when I put the proper signal parameters in place .. !
----- Original Message -----
From: "Steph" <Steph.Fox@btinternet.com>
To: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
Cc: "Frank M. Kromann" <frank@frontbase.com>
Sent: Saturday, December 29, 2001 1:02 PM
Subject: Funky new error message - win32 only I *think*
** ERROR ** file D:\php\php_gtk\main\php_gtk_object.c line 981: should not be reached aborting
on the dos screen I got
'Test' was selected from the menu.
abnormal program termination
C:\php4\dev\menu2.php has been running
I achieved this by running:
$filemenu->connect('activate-current', 'test_selected');
I get the same result with return key or spacebar.
The function is no big deal:
function test_selected() {
echo "'Test' was selected from the menu.\n";
flush();
}
Any daylight, Frank?
--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, e-mail: php-gtk-dev-unsubscribe@lists.php.net
For additional commands, e-mail: php-gtk-dev-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net