"be consistent" | |
PerlMonks |
Re: Win32 GUI - Problem with text input fieldby Anonymous Monk |
on Jun 15, 2014 at 23:11 UTC ( [id://1089976]=note: print w/replies, xml ) | Need Help?? |
Initial diagnosis and why Win32::GUI is bad :) Hello, I am currently trying to design a simple perl program with Win32::GUI. Win32::GUI is a dead end, hasn't been updated in forever, doesn't support unicode.... other problems with Win32::GUI and why I laught at those choosing Win32::GUI If the sub window is called again in the same season, no new input is being accepted... Does anyone know how to solve that problem? I assume its because of the way you write code , the way Win32::GUI docs encourage, the nested subs memory leaking closure way; see write Tk callbacks all lexically scoped and not-memory leaking with no nested subs ever :) avoid nested subs and closures because nested named subs because they're closures update: yup, my assumption was correct; if you add use warnings; you will be warned about this Variable "$main" will not stay shared ... Variable "$add" will not stay shared a ... update: your code fixed up
http://search.cpan.org/~robertmay/Win32-GUI-1.06/docs/GUI/Reference/Options.pod#-onEVENT http://search.cpan.org/~robertmay/Win32-GUI-1.06/docs/GUI/Reference/Options.pod#-eventmodel more generic win32 tips If you want to automate anything on win32 you have to absorb the following knowledge . It mostly consists of learing the ole/excel/powerpoint... object model, and using Win32::OLE to call it or sending messages using guitest. OLE is essentially a fancy/standardised way of sending messages. Its very much like web-scraping, you have to know HTTP/HTML DOM .... the rest is just legwork
In Section
Seekers of Perl Wisdom
|
|