So I went my merry way to implement this and started setting up a dialog box and then realized 'hey, wait a sec how do I write a function that handles an event but is called? I looked through the Win32::Gui examples but I didn't see anything.tfTapeName_Click (Type:Event){ Read text from textfield_Tapename; QueryDB (Tapename) If Tapename isn't in the Database then GetMFGDate() from user ELSE Tapename Is in Database Get MFGDATE() from QueryDB(Tapename) If MFGDATE too old then GetMFGDATE() from user until user acknowledges over-ride or enters a good MFGDATE GetDestination() from Textfield_Destination Until Destination is entered and is valid per TapePolicy GetDestination() from User Write Tapename, MFGDATE, Destination, Current time and date to Listview_Entered_Data. }
The goal here is
$somevariable = Dialogx();
Where Dialogx()creates a new dialog window asking for the relevant information and then returns the information heretofore placed in the dialog's textfield and transmitted by its ok button. The problem being that all user input is interpreted through events that occur outside the the sub and not neatly available like $somevariable = <STDIN> is. Can I do this with win32::gui? I could only think of how to do this if I used global variables and took that as a sign I may be off course here. Is there a better approach? I think I am getting hung up on my procedural based experience and maybe not seeing how to write this properly.
Pointers to relevant reference material, tips, code, examples eagerly sought.
Thanks, Talwyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |