I want to maintain and archive scratchpads inside my j602 jwd app by
leveraging /temp/ files.
The following creates a new /temp/nnn.ijs window and shows data in the window:
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
)
...but what it doesn't do is put that data into the file it's just
created, which meanwhile sits there empty.
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.
What's the right way to go about it?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm