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

Reply via email to