I spoke too fast about "the problem is solved," because the fix produces
another pair of problems; (1) instead of only seeing the last pen lines
drawn by the turtles, all of the pen lines on all of the browsers first
remain in their existing state and (2) then are redrawn and then the newest
pen lines are added. Not only is this confusing to the viewer, it can take
quite a considerable time as turtle activity is extended.

I am especially perplexed as to why I cannot clear all the pen ink from all
the sessions before the existing ink is put down (again). The draw()
function, which is called before every new drawing, starts with the command
gl.clear(...) that I thought gl.clear(...) would do just that, but does
not, apparently:

    gl.clearColor(bgcolor[0],bgcolor[1],bgcolor[2],1);
    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);

The second problem may be impossible to solve because I suppose there is no
way to differentiate among the various open browser sessions to
paint/draw() them differently. On the other had is it possible to send a
distinct numeric value to each browser session when it clicks the "command"
line? If so, then I'm thinking the value of `NUMBER` could be sent to each
browser and if it could be compared with the current value of `NUMBER`,
perhaps only the most recent ink could be laid down. If this problem could
be solved, it might be a way to also fix the first problem.

But I would like help on solving these 2 problems.


On Mon, Sep 29, 2014 at 1:30 PM, Brian Schott <[email protected]>
wrote:

> The problem is solved by my removing the commented out 2 lines below.
>
> They only belong in the initializing stages.
>
> Of course I did not share `ev_command_enter` before because the problem
> could not have been there. Duh.
>
> ev_command_enter=: 3 : 0
> NB. PENDING=: ''
> NB. NUMBER=: 0
> sm". getv 'command'
> jhrajax (":NUMBER),JASEP,viewXYZ,JASEP,viewUP,JASEP,}.PENDING
> )
>
> --
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to