I played around with your app and I am not entirely sure I understand what the problem is fully, but if you remove
ioFiles_close '' from the end of the iofiles_doneBtn_button function, then all the messages appear as I think they should. If I have missed the point or this is unhelpful, please ignore me. Regards, Jon > Date: Mon, 4 May 2015 10:02:18 -0400 > From: [email protected] > To: [email protected] > Subject: Re: [Jprogramming] More GUI questions > > Hi - > > I've put the code here - https://github.com/DevonMcC/GUI-examples - it's > the deNormalizeDE.ijs file. > > Any tips would be appreciated. > > Regards, > > Devon > > On Sun, May 3, 2015 at 12:05 AM, Raul Miller <[email protected]> wrote: > > > Can you put the complete code somewhere? (Like, for example, in a gist?) > > > > It's hard to debug something that cannot work. > > > > Thanks, > > > > -- > > Raul > > > > On Sat, May 2, 2015 at 11:01 PM, Devon McCormick <[email protected]> > > wrote: > > > Hi - > > > > > > I've got my J 8.03 simple GUI window basically working - all it does is > > get > > > an input and output file. The ten lines of code that do the work in > > which > > > I'm interested are dwarfed by the 90 or so lines of GUI code. > > > > > > However, I still don't understand how to update a message area as I > > proceed. > > > > > > Right now, the code invoked by my "Done" button looks like this: > > > > > > iofiles_doneBtn_button=: 3 : 0 > > > inpfl_Input_=. inpfl_Input_-.LF > > > if. '/'={:outpfl_Input_ do. > > > wd 'set msgBox text Please set output file' > > > wd 'set outpfl focus' > > > else. > > > if. fexist outpfl_Input_ do. > > > wd 'set msgBox text Overwriting ',outpfl_Input_ > > > end. > > > rc=. 1 > > > wd 'set msgBox text Starting at ',(":(6!:0)''),'...' > > > wd 'set doneBtn focus' > > > try. denormalize_base_ inpfl_Input_;outpfl_Input_ > > > catch. rc=. 0 [ wd 'set msgBox text Error' end. > > > (6!:3) 2 [ wd 'set msgBox text Done at ',(":(6!:0)''),'...' > > > if. rc do. wd 'set msgBox text Tabular output in > > > "',outpfl_Input_,'"' end. > > > smoutput (6!:0)'' > > > ioFiles_close '' > > > end. > > > '' > > > ) > > > > > > As you may be able to guess from looking at this, I want to update the > > > message area with a warning that I'm overwriting an existing file if > > that's > > > the case, and I want to put some kind of confirmation when I'm done. > > > However these parts do not do anything. I understand that the latter > > part > > > of the code does not work whereas the initial request to "Please set > > output > > > file" does because the initial message exits, giving control back to the > > > event loop whereas the other messages don't get a chance to be displayed > > > because I'm still in the "Done" button routine. > > > > > > So, any ideas how one handles this sort of thing (showing messages while > > > continuing other processing)? Do I need to mess with the system timer or > > > something? > > > > > > Thanks, > > > > > > Devon > > > -- > > > Devon McCormick, CFA > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Devon McCormick, CFA > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
