Hello.

After finishing off my last marshmallows ... I went and read the help
file. After following the instruction there, I encountered the following
error:
   (3 : '0!:0 y')<BINPATH,'\profile.ijs'
|file name error: script
|       0!:0 y[4!:55<'y'

So to replicate the problem, just do the following.
1. Open J602 and open up the Project Manager. CTRL+B would do the trick.
2. Create a new project and name it test.ijp
3. Add a file to the source tab and call it test.ijs then just put any
script in there.
4. Click on the project tab and ADD a project script and point it to
'c:\test.ijs'
5. Now click on the menu item Project->Build Option. It should show you
the Build Option dialog box.
6. In the Include Files frame, tick on both Include Project Libraries
and Standard Libraries. 
7. Click on the Build Now button to create 'c:\test.ijs'
8. Open the file 'c:\test.ijs' using your favourite text editor and
notice (as expected) that it should contain not only your code but also
a bunch of other scripts which is the standard libraries.
9. Close all instance of J.
10. Using the command line, run J.exe with -jprofile so it would load
without a profile like so (in my PC): C:\j602\bin\j.exe -jprofile
11. This should open a totally bare J session window. Type the following
to setup the system
  18!:4 <'z' 
  0!:100 <'c:\test.ijs'
  18!:4 <'base'
  BINPATH_z_=:1!:46''
  ARGV_z_=:'oleclient';'-jijx'
  (3 : '0!:0 y')<BINPATH,'\profile.ijs'

There is no problem if I do the same thing from STEP 10 to 11 but not
load 'c:\test.ijs' file like so:
  18!:4 <'base'
  BINPATH_z_=:1!:46''
  ARGV_z_=:'oleclient';'-jijx'
  (3 : '0!:0 y')<BINPATH,'\profile.ijs'

I actually searched for this and the code that's failing is one of the
following:
c:\j602\system\main\stdlib.ijs (4)
". 'do_',(' '-.~y),'_ '' (#~ -.@(4!:55)) (4!:1) 0 1 2 3'''
erase=: [: 4!:55 ;: ::]
script=: [: 3 : '0!:0 y [ 4!:55<''y''' jpath_z_ &.: >
scriptd=: [: 3 : '0!:1 y [ 4!:55<''y''' jpath_z_ &.: >

I would appreciate any help or insight regarding the matter.

Thanks.

r/Alex

P.S.
I'm out of marshmallows. :((

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alex Rufon
Sent: Thursday, March 06, 2008 8:50 AM
To: Programming forum
Subject: RE: [Jprogramming] J602: How to show the Session Window
whenJcalledas COM?

Oh. 

It seems I'm bitten by the -. RTFM bug.

Thanks. Will look into it as soon as I finish off this last remaining
marshmallow in my coffee.

r/Alex

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eric Iverson
Sent: Wednesday, March 05, 2008 9:50 PM
To: Programming forum
Subject: Re: [Jprogramming] J602: How to show the Session Window when
Jcalledas COM?

Read the following for info on 602 J server initializaion:
Help>User Manual>COM, OLE, and OCX>J OLE Automation Server

Although 1!:45 was removed, 1!:46 was added specificially so J server 
clients could find the J folder. Note that 1!:46 is the bin path.
|
----- Original Message ----- 
From: "Alex Rufon" <[EMAIL PROTECTED]>
To: "Programming forum" <[email protected]>
Sent: Wednesday, March 05, 2008 3:17 AM
Subject: [Jprogramming] J602: How to show the Session Window when J
calledas 
COM?


Hello.



I just got the J602a installed on my machine and I'm trying to migrate
my project from J601.



Under the previous versions of J from (5.04 to 6.01), I just add the
following to my J scripts:

NB. =========================================================

NB. ijx init

NB.

NB. note: pjijx form name permits tests on "jijx" if

NB. there is any ijx session, and on "pjijx" if there

NB. is a pijx session

NB. $Id: init.ijs,v 1.1.1.1 2004/02/09 06:24:48 amrufon Exp $



NB. =========================================================

JIJX=: 0 : 0

pc pjijx nomax nosize;

xywh 0 0 250 150;cc e editijx ws_hscroll ws_vscroll es_nohidesel
rightmove bottommove;

pas 0 0;

rem form end;

)



NB. =========================================================

showJ=: 3 : 0

if. 1 e. 'jijx' E. wd 'qpx' do. return. end.

create''

)



NB. =========================================================

create=: 3 : 0

wd JIJX

wd 'pn *',pname''

wd 'setfont e "Lucida Console" 11 oem'

wd 'pshow'

)



NB. =========================================================

closeJ=: 3 : 0

if. 0 = 2 wdquery (pname'');'Do you want to close?' do.

  2!:55 ''

end.

)



NB. =========================================================

pname=: 3 : 0

'Session Server'

)



NB. =========================================================

pjijx_close=: pjijx_cancel=: closeJ



NB. =========================================================

showJ_z_=: showJ_pijx_

NB. =========================================================



Then in C#/VB.NET/VB6/C++ I would create an instance of the COM
JEXEServer object like this in C#

// Create a new copy of the J Object and make sure were in the Z locale

jObject = new JEXEServerClass();

jObject.Quit();

jObject.Log(1);

jObject.Show(1);

this.Eval("18!:4 <'z'");



// Now get the base EOE Script

jScript = UnicodeEncoding.ASCII.GetString(Resources.eoeBaseScript);

if (this.debug) { jScript += "\nshowJ ''"; }

// load this script to the current session

this.Variable("baseScript", jScript);



// Now we execute the values in the loadScript Variable

this.Eval("0!:100 baseScript");



In the previous versions of J, when this.debug is TRUE, it would load a
J Session with no profiles. It is very useful during debugging and I
have come to rely on it. Unfortunately, I actually don't know how to do
this in the latest version.



Another thing, to load my profile and be able to properly debug, I have
the following scripts which because of the deprecated status of the
1!:45, I won't be able to debug my application. I execute the
loadprofile verb as soon as showJ verb does its job in displaying a
session. The load script looks like this:

loadprofile=: 3 : 0

ifp=. 1 e. 'pjijx' E. wd 'qpx'

if. ifp do.

  wd 'psel pjijx'

  fx=. wd 'qformx'

  wd 'pclose'

end.

0!:0 < 1!:45''

wd 'psel ',qsmact_jijs_''

if. ifp do.

  wd 'pmovex ',fx

end.

wd 'pn *',pname_pijx_''

9!:3 [ 5

load 'debug coutil'

)



Btw, it is obvious that I didn't code for the these scripts ... hence my
pathetic state. Still, I would really appreciate any help in getting
this to work so I can migrate to version 6.02. Thanks. J



r/Alex



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
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