Let's slow down a bit and try to think about what you are really trying to
do here.

First, though, I have an issue here, with the concept of "in the server".
There is certainly a perspective where "only be one jhrajax in the server
for any jdoajax() sent by the client" is valid. It's an approximation - but
a good enough approximation if we manage our expectations properly.

Meanwhile when I look at your definition of paint in tgsjhs.ijs I see this
line:
  drawpathlist =. {:DrawPathList

In other words paint is currently implemented to only paint a part of the
picture. Why?

On the other hand, when I look at tgsjhsutil.h I see you are using 'paint'
in a variety of places.

I think if you just arranged to draw all of DrawPathList you'd get the
visual effect that I think you are looking for. Usually, that is - you are
counting on the browser to queue its requests in the order they were
generated, and that might glitch in some browsers. Still, it should work as
a first approximation, and I think that that would be a worthwhile exercise.

Meanwhile, to achieve what I think you are trying to achieve (which is a
step-by-step style), ... actually I can think of a lot of ways to
accomplish that. One fun way involves using jQuery's deferred objects. This
allows you to lay out your javascript code so that the sequence-over-time
is laid out physically using a structure rather like if/then/else
statements (but it's really more like working with J gerunds, using the
"gerund-like-objects" to allow code to pick up and continue after receiving
a response from the server).

Maybe some of this helps?

Thanks,

-- 
Raul





On Sun, Mar 23, 2014 at 12:21 PM, Brian Schott <[email protected]>wrote:

> Raul and Pascal,
>
> You are not understanding me.
>
> I don't think this is a question about browser being ready, Raul, because
> as I said inmy last post's beginning statement, the following.  Is that a
> correct statement?
>
> "My understanding is that there can only be one jhrajax in the server for
> any jdoajax() sent by the client."
>
>
>
> Perhaps the misunderstanding is that the client (js) has a text field into
> which the user places a j expression. That expression may produce several J
> paints and js draw()s, and the user need not be aware of that.
>
> Maybe my example using repeats is too simple. Consider another builtin verb
> available to the user, named goto0 to which the user supplies a desired
> location for the turtle. There are 5 internal steps to goto0 which are
> summarized below. Each step ends in a j `paint''`. But each paint'' in its
> present configuration ends in a jhrajax. (btw, pt is a pitch turn and yw is
> a right turn)
>
>   NB. in 5 steps execute "goto0"
>   NB. 1: +yw toward the desired point
>   NB. 2: +pt toward the desired point
>   NB. 3:  fd toward the desired point
>   NB. 4: -pt to reverse step 2
>   NB. 5: -yw to reverse step 1
>
> I am really sorry I cannot explain my situation so you can undertand it.
>
> --
> (B=)
> ----------------------------------------------------------------------
> 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