#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 need. 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); }