Hi,

 

How do I handle change events with the "edit" form control? Consider the
following form definition:

NB. Required libraries

require 'regex files'

 

EDI2AS400=: 0 : 0

pc edi2as400;

xywh 7 7 40 11;cc ccstatic1 static;cn "Source EDI:";

xywh 50 6 193 12;cc ediFile edit;

xywh 245 6 16 12;cc selectEDI button;cn "...";

xywh 50 21 88 11;cc ccstatic2 static;cn "Element Separator (CHR#):";

xywh 136 21 47 12;cc chrSep edit;

xywh 201 21 48 12;cc viewSource button;cn "Preview";

xywh 185 22 15 11;cc elemChr static;cn "[]";

pas 6 6;pcenter;

rem form end;

)

 

edi2as400_run=: 3 : 0

wd EDI2AS400

NB. initialize form here

wd 'pshow;'

)

 

edi2as400_close=: 3 : 0

wd'pclose'

)

 

edi2as400_run ''

 

 

edi2as400_selectEDI_button=: 3 : 0

fn =. wd 'mbopen ' 

if. 0 ~: #fn do.

 wd 'set ediFile *', fn 

 

 NB. Also resolve the element separator

 data=. freads fn

 NB. Search for the first ISA segment and return the next character

 wd 'set chrSep *', ": a. i. data {~ >:  +/, 'ISA' rxmatch data

end.

)

 

edi2as400_viewSource_button=: 3 : 0

)

 

edi2as400_chrSep_change=: 3 : 0

 wd 'set elemChr *', a. { ". chrSep

)

 

What I basically want is to handle the change events in an "edit"
control and update a "static" control with a new value.

 

Thanks.

 

r/Alex

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to