Joe,

I am pretty sure that is not the problem. ev_sentence_enter is never
executed, or else I would get the smoutput or the value of T would be
increased. I have trimmed the code as follows, and cannot get the
ev_sentence_enter to execute, at all. I got rid of initTurtles and the
init() and etc. I understand that ev_sentence_enter needs to post a
response, but I cannot even get ev_sentence_enter to execute. Can you see
what is wrong?

Thanks,

coclass'tgsj'
coinsert'jhs'


NB. HEXTRA put in html after CSS and before JS (because some things need to
come before HBS)
HEXTRA=: 0 : 0
<script type="text/javascript"
src="~addons/ide/jhs/js/webgl/glmatrix-min.js"></script>
)

HBS=: 0 : 0
'<h2>Type in a turtle command</h2>'
'sentence' jhtext '3+2';10
)

jev_get=: create

create=: 3 : 0
smoutput 'IN create'
'tgsj'jhr''
T=: 20
)

ev_sentence_enter=: 3 : 0
T=:T+1
smoutput seebox NV
s=: getv 'sentence'
". s
)


CSS=: 0 : 0
body{margin:10px;}
)

JS=: 0 : 0 NB. javascript
function ev_body_load() // must use JHS framework load handler
function ev_sentence_enter(){jdoajax(["sentence"],"");}
)



On Mon, Mar 3, 2014 at 10:40 PM, Joe Bogner <[email protected]> wrote:

> Brian, I get the following error when I run it:
>
> ev_body_load failed: ReferenceError: init is not defined, which is
> required since the javascript calls it here:
>
> function ev_body_load(){init();} // must use JHS framework load handler
>
> In jijx, I see this:
>
> |value error: initTurtles
> |       initTurtles 1
>
>
> In the code you pasted, I don't see initTurtles defined either
>
> Lastly, your post is failing because ev_command_enter needs to return
> a jhr response...
>
> ev_command_enter=: 3 : 0
> T=:T+1
> s=: getv 'command'
> ". s
>
> NB. NEED TO ADD SOMETHING LIKE BELOW
> create ''
> )
>
>
-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to