Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Thanks,

I already understand and have this type of thing working. The problem arises because glade2perl makes each window into a package and it is invoked as such: window2->app_run which returned nothing to assign to a variable because it hands control to Gtk->main within the app_run sub.

It looks like i was missing some of the default code that glade2perl puts at the top of each package. It puts a destroy_Form sub as well as toplevel_hide, toplevel_close and toplevel_destroy subs.

Now that I have them in there I can call any of them and it works. The destroy_Form sub calls Gtk->main_quit. The other 3 subs call: shift->get_toplevel->hide/close/destroy, and still work even when I supply no arguments to them from within a button click handler in the same package.

I hope this is what I'm supposed to be doing, at least it seems to work on the surface, who knows what it is doing or how much memory I'm chewing up needlessly behind the scenes :)

I thought I was going batty having to try to call methods of an object from within that class when I had no reference to that object to base the call on! - I was oblivious to the fact that subroutines were specially made to do what I was trying to do and I simply didn't cut and paste them correctly from the glade2perl output :|

Ryan *hides* :)

In reply to Re: Closing GTK child windows via code by ryan
in thread Closing GTK child windows via code by ryan

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-19 17:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found