Raul,

Those were great instructions. I have been to the console before, but only
saw output, for example. I did not know you could enter commands there. And
entering console.log(gl) I got lots of output including expandable lines
with arrows/triangles pointing to the right.

That queueing business you mention is likely necessary. Because my j paint
verb always produces a jhrajax, and I cannot imagine a way to doctor the j
code so that it produces only 1 jhrajax even for multiple commands, I bet I
need to think in terms of sockets, or the s-word for me. I hope not.

There is no way for js to know there is a multiple valued command when the
text field is processed; only J could know that and I cannot imagine J even
distinguishing between individual and multiple commands automatically. Even
J would need some user supplied code to indicate that a command was really
comprised of embedded other commands. I suppose the user could be given two
different text entry fields: one for individual commands and one for
multiple commands. But then how would J know how to parse the multiple
commands differently from the way it is presently. Actually I guess J could
assume all commands are multiple commands and then save up the multiple
results in a stack to finally be sent to JS. I'll have to think about how
that could be done. But that is likely the answer, if there is one.

Thanks, very much,




On Sat, Mar 22, 2014 at 1:35 PM, Raul Miller <[email protected]> wrote:

> I think I see the problem.
>
> If you really want multiple calls to jhs then what you need to do with
> entered commands is have them add themselves to a queue and then have each
> of them send the first entry in the queue to jhs (and have the handler then
> send the next entry on to jhs). But that strikes me as the wrong approach.
>
> Instead, I would imagine you should send the whole line of commands to jhs
> and let it handle them all together.
>
> Put differently, I think you need to start thinking in terms of data rather
> than commands.
>
> That said, here's a little experiment which I think should work in safari:
>
> Open up the developer console (in chrome, I can do this by right click
> "Inspect element" and then selecting the "Console" tab).  Then, at the
> prompt type 1+1. If you get 2 you are in the right place.
>
> Next, try entering console.log(3). That should display a line with 3 on it
> (and give you an "undefined' result).
>
> Next, try editing your code - maybe put console.log(gl) right after the
> line that defines gl, and reload the page. You should see some
> representation of the gl object displayed in the console.
>
> Hopefully that will be enough to get you started?
>
> I'll take a look at the code you linked in your other message.
>
> Thanks,
>
> --
>


-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to