I just started teaching myself using Gtk-perl, Glade and glade2perl and have a simple problem that is probably stemming from my lack of understanding of how all the modules Glade produced interact or some dilusion I have with objects/classes.
I have 2 windows. The main one loads up, then I have a button that opens the second window (modal) using window2->run (is that the correct way to do it?)
If I then close that window using the 'X' (close icon) provided by the window manager it closes and all the relevant signals get generated.
I want to be able to close this second window via code, so that particular buttons in the window could also close it, but I can't figure out how!
I'd have thought I could call the destory or hide on the window or even emit a delete_event, but it seems from the errors I can't call/do any of these thing on the second window object because I am calling them from within the object and it is therefore not blessed.
Am I using all these modules Glade kindly produced for me incorrectly? or is there a way to call these methods on one's self as it seems that is what I need to do ... and specifically how to do all that and close the window?
Thanks, Ryan
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.