Henry Rich wrote:
> I have managed to use PM to build my entire app, but I have
> a problem when I run on a machine other than my development
> machine (the other machine does not have the same addons as
> my development machine).

It seems that your app is designed to run in the IDE, and that you are
using PM to build it into a standalone script. But you need to plan for
a standalone script. For example, a standalone app has no IDE for
debugging, so you need error trapping and logging to help you debug.
Also, you need to take care of any loads and requires that are used in
the IDE.

> If my user profile runs, it seems to set PATHSEP which causes
> the code at the top of the standalone app to return fast, with
> the result that 'require' doesn't get nulled out and a later
> require fails because a library is missing.

A standalone app built by PM has some definitions at outset that are
intended for a standalone script. These definitions are not run if you
load the script in the IDE, since otherwise they would clobber the IDE.
This permits testing a standalone script in the IDE.

> If I set -jprofile, the app will load, but ARGV is not set
> and I have no way to pass parameter information into the
> program.
> 
> If I set -jijx, the app runs, but if it fails I will not have
> a debugging window, which will be intolerable.
> 
> What I need is a way to have the jijx window, ARGV, and no
> profile.  Is that possible?

ARGV will be set, and you can also pass parameters in additional files
that are read by your app. For ARGV, try defining cmd.ijs as:

(,(":ARGV),.10{a.) 1!:2 <'test.txt'
2!:55''

Then, in the command prompt:

./jconsole -jprofile cmd.ijs 123 'hello'

cat test.txt
+----------+---------+-------+---+-----+
|./jconsole|-jprofile|cmd.ijs|123|hello|
+----------+---------+-------+---+-----+

> Second question.  It looks like the Scripts tab in PM tells me
> what libraries are referenced, but that I then have to go by
> hand into the Library tab and select each one for inclusion
> in the target.  And if I forget one, there's no way to know
> until (possibly much later) something is missing.
> 
> Is there a button I can press, or some automated mechanism,
> whereby all the libraries I need are automatically pulled in?

No, you need to add required libraries manually. When developing with
PM, add a library in the library tab, and not with a load or require
command in your source scripts. You might want to add a load or require
command in the scripts for testing, and PM has no way of determining
whether this is needed for the final build.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to