btw when I do the following I have the same problem

ex=: 3 : 0
viewmat i. 16 16
stop=.
savemat_jviewmat_ 'C:\Temp\immex0.bmp'
)

run ex
run debug
execute ex 0
then execute
savemat_jviewmat_ 'C:\Temp\immex0.bmp' 
in the ijx window while in debug mode

cheers


Roelof

"Have a cool mind and a warm heart" - Ajahn Sona
 "Like ......(hamsters on a wheel), (ambitious people) still climb and
climb, with great labor, and incessant anxiety, but never reach the top."  
Robert Browning
"We shall not cease from exploration. And at the end of all our exploring
Will be to arrive were we started and know the place for the first time" -
T. S. Eliot


Dr. Roelof K. Brouwer PH.D.  P.Eng.
Professor Emeritus
Dept. of Computing Science
School of Advanced Technologies and Mathematics
Thompson Rivers University
900 McGill Road
Kamloops, BC
Canada, V2C 5N3

email : [email protected]
www.tru.ca/advtech/compsci/faculty/rbrouwer


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Devon McCormick
Sent: December-15-08 2:53 PM
To: Programming forum
Subject: Re: [Jprogramming] savemat_jviewmat_

Dan - this doesn't solve the problem.  What he's trying to do is something I
brought up at an NYCJUG meeting in May - i.e. an expression like this:

   savemat_jviewmat_ 'C:\Temp\immex0.bmp'[wait 1[viewmat i. 16 16

displays and saves a blank viewmat image.  On the other hand, entering

   viewmat i. 16 16
   savemat_jviewmat_ 'C:\Temp\immex0.bmp'

in immediate execution works fine.

This is frustrating for me because I tend to develop in immediate execution
and rely on the behavior remaining the same when I gather together the
working lines from the session and put them into a function definition.  In
this case, I use the "image3" functions for a workaround.

On Mon, Dec 15, 2008 at 4:40 PM, Dan Bron <[email protected]> wrote:

> I wrote:
> >  you might try using a (latent) immex phrase.
>
> Roelof responded:
> >  I assume you mean that I should stick that before the saveviewmat
> command.
>
> Sorry for being unclear.
>
> I didn't read the thread in detail, but I got the impression that you have
> some asynchronous GUI effects that need to be run from immediate execution
> to work properly.  This problem has arisen before.
>
> A common (to use the word generously) solution is to use the "immex
phrase"
> (latent expression) foreigns.  These foreigns permit you to schedule a
> sentence to execute the next time J becomes free.  That is, when J is done
> with all its other work, just before it returns to immediate execution
> (the idle state where it awaits commands), it will execute your sentence.
>
> The foreigns are already packaged up neatly by the standard verb
> runimmx1_jijs_  .  So what I'm suggesting is that you replace
> savemat_jviewmat_ blah  with  runimmx1_jijs_ 'savemat_jviewmat_ blah'  in
> your verb.
>
> If you do so, you must keep in mind that the  savemat_jviewmat_  will be
> executed *after your verb completes*, so the remainder of your verb (or
> script, or anything else) cannot depend upon its results or side effects.
> Also remember you can only have one immex phrase (but of course it can do
> more than one thing).
>
> Does that help?
>
> -Dan
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
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