Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
My company just hired a Jr. Technician to help out with the NT administration and the idiot doesn't even know what a dos prompt is. A direct quote from Jr. Tech "All my experince is dealing with Graphical Interfaces, I don't have time to learn dos". I said "What about automation and diagnostics? A command line can offer you much greater power." He had no comment to this remark.

Besides the point that the management are a bunch of monkeys for hiring someone with so little technical competence, I am no stuck babysitting. Having one of the key virtues of perl down "Laziness" I decided I would be better off porting my major tools over to a GUI, this way I didn't have to hold my breathe while he tried to learn dos. I have had quite a bit of success at using Win32::GUI for dealing with my problem. However today I hit a brick wall with one of the scripts.

I have one Window object that accepts all the user input and flags with a submit button on the window. When the submit button is hit I have an event that displays the result in a different Window object that then becomes visible. This works great!

sub submit_Click { print $count++; %Config = (); # Several lines of logic to determine and stores # users values and settings into %Config display_results(/%Config); #builds my results window $Display->Show(); #my display window }

My problem is when I terminate the result window after the first time everything seems to break.

sub Display_Terminate { $Display->Hide(); $Window->Enable(); #Grasping at straws return 0; }
I try to do another query using my submit button, it seems that my submit_click event is ignored the second time around, however the result window still pops up but this time with different results, it doesn't pull any of my definitions or flags, it justs uses the code defaults. Notice my submit_click event I added this line for debugging
print $count++;

The very first time I click the submit button I get what I expect, a 0 on the command line. Once I have gone through the cycle once it fails to display any more on the command line, ignoring my event altogether. What also baffles me is the fact that the result window displays at all considering that it doesn't seem to get into my desired event. This is the only place in the entire script that the Result window is made visible.

Any ideas on what is causing my event to not be reconized properly?


In reply to Win32::GUI event issues by orbital

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 goofing around in the Monastery: (5)
As of 2024-04-22 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found