Hey Aldo,

I tried the Global hash approach and it works ...sort of...

I think I need some pointers on how to tune DoEvents(). When I entered data in the dialog box I got ~880 key repetitions. I was able to get those 880 letters back to the originating function though... so I'm making progress.

Snippet Follows

#Events----------------------------------------------- sub ::Dialog1_Terminate { defined(my $win = $Win32::GUI::Loft::window{winMain}) or return(1); print_dbg(" I am now enabling the window!"); $win->Enable(); return(1); } sub ::btnDialog1_Click{ defined(my $win = $Win32::GUI::Loft::window{Dialog1}) or return(1); our %MSG = %main::MSG; my $text = $win->tfDialog1->Text(); $MSG{"Dialogue"}{"Text"}= $text; return -1; } #App---------------------------------------------- sub GetDestination{ #( $combobox ) #This function returns the drive library or other Destination #Selected in the Combobox object passed to it. my $combobox = shift; local %::MSG = %main::MSG; defined(my $win = $Win32::GUI::Loft::window{winMain}) or return(1); #Ensure $combobox is infact a combobox object abort if not. unless ( "ComboBox" eq $combobox->GetClassName() ){ print_dbg ($combobox->GetClassName()); die "REcieved a bad object!"; } my $destination = $combobox->Text(); print_dbg ("Selected:".$destination); $destination =~s/\s//; if ($destination eq ''){ print_dbg ("No Destination!"); $win->Disable(); # disable main window until we get info we ne +ed. my $dlg = configure_window ('dialog.gld'); $dlg = build_window($dlg, "Dialog1"); $dlg->lblPrompt->Text( "You must enter a destination. \n". 'Type one in the box below.'); $dlg->Show(); do{ Win32::GUI::DoEvents(); } until ($::MSG{"Dialogue"}{"Text"} ne ''); print_dbg ("The user entered: ".$::MSG{"Dialogue"}{"Text"}); } print_dbg ("I AM A STUB FIX ME!"); return ($destination); }

In reply to Re: Re: Re: win32::Gui -- Paradigm problem...How do you get info back from a dialog? by talwyn
in thread win32::Gui -- Paradigm problem...How do you get info back from a dialog? by talwyn

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.