I decided to put some defensive code around various handlers in my small
app. For example, I have a small routine like
myapp_viewdata_button=: 3 : 0
viewdata''
wd'psel myapp;'
wd 'sbarset idstatusrdy 50 Ready'
)
and another like
viewdata =: 3 : 0
if. (# 'datasheet' names 0) do. grid datasheet
else. wdinfo 'Alert';'Please read legacy data first.' end.
)
That works annoyingly fine when run out of an IDE window; both branches
work. In particular, if datasheet hasn't been created yet, it won't
produce an error. I'm using try. catch. in other places to do something
similar.
When I package it with Inno Setup and run it with a -jijx option, the app
fails with a wdhandler error:
error in myapp_viewdata_button
index error: pick
wd'psel',1 pick,p#~(<'jijx')=3{"1 p
There may be more, but that's all that shows.
If I remove the -jijx from the shortcut, it works again. Note that my
packaged app is depending upon a locally installed J and all the local
configuration (addons, etc.); all I'm packaging are two script files
(something like forms.ijs and scripts.ijs).
http://www.jsoftware.com/jwiki/Guides/Startup?highlight=%28jijx%29 says,
"If the first parameter is the -jijx switch, the normal J IDE window,
where you type commands and see them executed, will not be created. You
must have a fully standalone application. Except for creating the IDE
window, the J startup sequence will be followed as described below, and
the -jprofile switch will be honored."
I interpret that to mean that I should have the same environment _except_
that there is no IDE, but something seems to have changed. Debugging by
exploration seems challenging, since it works if I have an IDE to debug
it.
Is it possible that one of the config files does not get loaded when the
-jijx option is used? How can I figure this out? How can I fix my app so
that it works even with -jijx?
Thanks,
Bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm