Brilliant! Thanks Raul, that does the trick nicely.

Kinda obvious in hindsight. newijs_jijs_ will of course not create the
"missing" globals, SMHWNDP,  SMNAME, IFIJX in its own locale, but in a
separate instantiated object (a numbered locale) so as to allow
several IJS windows to be open at once. In fact that's all the
numbered locale contains.

But I wonder how long it would have taken me to guess that, without help.


On Tue, Apr 19, 2011 at 1:29 PM, Raul Miller <[email protected]> wrote:
> On Tue, Apr 19, 2011 at 8:11 AM, Ian Clark <[email protected]> wrote:
>> It needs an explicit File > Save to save its contents. I would like to
>> do this automatically inside ijsstr. But when I add a further line
>> like this:
>>
>> ijsstr=: 3 : 0
>>        NB. Open a new IJS window with: (str)y
>> cocurrent 'jijs'
>> newijs''        NB. create a new IJS window
>> wd 'set e *',,y NB. and fill it with the text in y
>> save 2          NB. just guessing at: y=2
>> )
>>
>> it fails because necessary globals aren't set up, notably SMHWNDP.
>
> I am getting:
>
>   newijs_jijs_''
>   save_jijs_ ".>{:conl 1
> |domain error: wd
> |   dat=.    wd'qd'
>
> That fails for me, but I think this does what you want:
>
>   n=: {:conl 1
>   save__n ''
>
> --
> Raul
> ----------------------------------------------------------------------
> 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