mmartin has asked for the wisdom of the Perl Monks concerning the following question:
So from what's going on here I would assume that whatever you put inside the "set_url_hook()" function gets executed immediately upon creation of the AboutDialog. I did see a SIGNAL available for the AboutDialog that's called "activate-link" but I couldn't connect it with "signal_connect" function...# Create a MessageDialog to display the "About" Info in: my $about_window = Gtk2::AboutDialog->new; $about_window->set_program_name("Program-Name"); $about_window->set_version('v1.0'); $about_window->set_copyright('August 2013'); $about_window->set_comments("This is the Comment String"); # Using Google.com just as an example: my $url = "http://www.google.com"; $about_window->set_url_hook(open_browser($url)); $about_window->set_website($url); $about_window->set_authors("....author_data...."); my $about_img = "$icon_DIR/Icon_Logo.png"; my $about_pixbuf = Gtk2::Gdk::Pixbuf->new_from_file($about_img); $about_window->set_logo($about_pixbuf); # Add the Hide action to the 'Close' button in the AboutDialog(): $about_window->signal_connect('response' => sub { $about_window->h +ide; }); $about_window->show;
And the line that the error references to is the line that has Gtk2->main; on it... So I tried putting a test sub in the set_url_hook() and I get the same error and whatever the Sub returns is what Perl is saying is a Undefined Subroutine.Undefined subroutine &main::0 called at
So I just thought I should mention that since I'm tinkering with it a bit...Undefined subroutine &main::Hello called at
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl Gtk2 AboutDialog's "set_url_hook()" is Not Working as Expected.
by Crackers2 (Parson) on Aug 22, 2013 at 19:46 UTC | |
by mmartin (Monk) on Aug 22, 2013 at 21:31 UTC | |
by mmartin (Monk) on Aug 23, 2013 at 14:40 UTC |