OK, you are telling me that I can't use the full IDE with
-jprofile.

I will settle for running the user's profile, as long as I can
load the 'standalone' script after the profile has run.  In other
words, I want to use PM to package my app so that I don't have
to worry about what addons are in the user's machine.  I still want
the full IDE so I can easily troubleshoot the expected crashes in
the early days.

The problem is that the addons in the script have requires that
fail when the 'standalone' script is loaded.

I think that all I need is to disable load and require when my
'standalone' script is loaded.  The script will have all the
code I need, and I just need to make sure that requires in the
addons don't cause errors during the load.

Is there any way to stick a line into the front of the
'standalone' script that will disable load and require?
I could do it in a short ijs script, if there is any way to
force that script to be put into the standalone script ahead
of the libraries.




I'm not sure what I did that made my ARGV set to <'undefined' when 
I was testing, but that is no longer a problem.

Henry Rich


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Chris Burke
> Sent: Monday, December 25, 2006 5:41 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Can I have ARGV, jijx, and 
> -jprofile? and library question
> 
> 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

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to