Dear monks, I recently read the Perl News article about GTK2 and decided to look into it as I have alwats thought that Tk just didn't look good enough. I went to the GTK2 Win Bin home page and downloaded and installed all the dependecies and file nessicary.
I also found the following code to use as an example
#!/usr/bin/perl use Gtk2; Gtk2->init(\@ARGV); my $window = Gtk2::Window->new('toplevel'); my $button = Gtk2::Button->new_with_label("Hello World"); $window->add($button); Gtk2::GSignal->connect($button,"clicked", sub { Gtk2->quit(); r +eturn 0 }); $window->show_all(); Gtk2->main(); exit 0;
When I run this code I get this error message
Usage: init(class) at gtk_example.pl line 3.
Personally I don't have a clue what this means and I thought that I'd post this here while I keep looking around the docs.
Also I love if any one could point me to a good tutorial for using GTK -perl with windows becuase this is my first ever look at it.
Thanks

All the Best, Eoin...

If everything seems to be going well, you obviously don't know what the hell is going on.


In reply to Usage: init(class) @ GTK by eoin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.