Yuva wrote:
> I want to reload the form to handle the bugs that 
>  can arise in production code.

I'm a little concerned that this happens often enough that you need a button ;)

In any case, when I wrote:
> For example,  3 : 'load (4!:4<''y'') { 4!:3$0' 0  will reload 
> whatever script it's run from (it won't work in the IJX 
> window). 

I didn't mean that it wouldn't work on Windows, I meant only you couldn't type 
that directly into the session manager (the IJX
window).  It has to appear in a script file and be run indirectly.  It will 
work just fine on Windows (or any other J platform).

Actually, I just tested it, and it appears there's been some undocumented 
changes in this area.  Apparently local names are no
longer valid inputs to  4!:4  .  That's unfortunate (but only for this one 
small use; it may herald bigger, more important changes
in this area).

So, in lieu of  y  , you must use a global name.  I suggest you use the name of 
the function itself.  In the case I laid out, that
would be  matrix_reloaded_button  .  

I put together a small example for you:  

   http://www.jsoftware.com/svn/DanBron/trunk/uncategorized/matrix_reloaded.ijs

BTW, if you know the name of the script you want to reload then all this is 
overkill .  In that case, you really only need to
define a verb like this:

        matrix_reloaded_button =: 3 : 'load ''c:\path\to\script\buggy.ijs'' '  

-Dan

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

Reply via email to