Yeah, that's a good way to do it.  Thanks.

Henry Rich

Don Guinn wrote:
> Interesting problem. This might do what you want. Simply have two form
> definitions but let each have different pc names. Then in each of the _run
> verbs simply change the name for which ever you want to be statusmon.  I
> should have used statusmon as the names when I built this but I didn't. The
> form editor seems happy and both runs work.
> MYFORMN=: 0 : 0
> pc myformn;pn "Online";
> menupop "File";
> menu new "&New" "" "" "";
> menu open "&Open" "" "" "";
> menusep;
> menu exit "&Exit" "" "" "";
> menupopz;
> xywh 136 8 44 12;cc ok button;cn "OK";
> xywh 136 23 44 12;cc cancel button;cn "Cancel";
> pas 6 6;pcenter;
> rem form end;
> )
> 
> MYFORMF=: 0 : 0
> pc myformf;pn "Offline";
> menupop "File";
> menu new "&New" "" "" "";
> menu open "&Open" "" "" "";
> menusep;
> menu exit "&Exit" "" "" "";
> menupopz;
> xywh 136 8 44 12;cc ok button;cn "OK";
> xywh 136 23 44 12;cc cancel button;cn "Cancel";
> pas 6 6;pcenter;
> rem form end;
> )
> 
> myformn_run=: 3 : 0
> wd 'pc myform',10}.MYFORMN NB. Replace the name.
> NB. initialize form here
> wd 'pshow;'
> )
> 
> myformf_run=: 3 : 0
> wd 'pc myform',10}.MYFORMF NB. Replace the name.
> NB. initialize form here
> wd 'pshow;'
> )
> 
> myform_close=: 3 : 0
> wd'pclose'
> )
> 
> myform_cancel_button=: 3 : 0
> myform_close''
> )
> 
> 
> On Sat, Dec 20, 2008 at 11:39 AM, Henry Rich <[email protected]> wrote:
> 
>> I have a program that runs in two modes, online and offline.  The
>> program is the same, and its interaction with the main form is mostly
>> the same, except that a lot of stuff is not available offline.  So I
>> have two versions of the main form,
>>
>> STATUSMON =: 3 : 0
>> pc statusmon;
>> ...
>> )
>>
>> STATUSMONOFFLINE =: 3 : 0
>> pc statusmon;
>> ...
>> )
>>
>> I pick which form I wd to the screen, and thereafter all the online and
>> offline code is the same.
>>
>> The problem is, the Form Editor won't let me edit the second definition.
>>  It shows me the two (identical) names, but when I select the second,
>> it shows me the definition for the first.
>>
>> Is there an easy workaround for this?  (Now that I type, I see one: I
>> can move whichever definition I want to be before the other, then run
>> Form Editor.  Anything even easier than that?)
>>
>> Henry Rich
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to