Transferring information out of ScriptFollows code

MiServer is Dyalog's APL-based web development framework

Transferring information out of ScriptFollows code

Postby Jinny on Mon Mar 02, 2020 10:09 pm

Hi there,

I'm stuck again! You helped me learn how to move my APL variables into ScriptFollows sections (eg jo←'var num= ',number,';' ⋄ Add _.script jo ).

However, now I need to return the contents of a variable back to APL from the ScriptFollows section. Please how do I do it?!

Thank you, Jinny
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: Transferring information out of ScriptFollows code

Postby Jinny on Tue Mar 10, 2020 8:24 am

I'm trying to get round the problem in another manner - but needless to say that has its own issues!

I am running a canvas script from a callback function now. The only problem is that I don't know where to place this statement:

'#mycanvas'Add _.canvas

And so I keep getting a value error for mycanvas, as below:

VALUE ERROR
CBF[19] r,←Execute' var can = document.getElementById('mycanvas'); '



I suspect I may need to use Replace _.canvas but I'm not sure what the statement would be.

If anyone has any offers...
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am

Re: Transferring information out of ScriptFollows code

Postby Brian|Dyalog on Wed Mar 11, 2020 5:54 am

Hi Jinny!

First, forgive me as I did not see your post of 2 March 2020. Normally I get a notification email, but I must have missed it.

I'm not sure I understand your statement "I need to return the contents of a variable back to APL from the ScriptFollows section". The ScriptFollows section is just the text of the contiguous comments following the call to ScriptFollows. Can you give me more details on what you're trying to do?

In your message from 10 March, the VALUE ERROR is due to fact that you're using quotes within quotes. You should either double the single quotes document.getElementById(''mycanvas'') or use double quotes document.getElementById("mycanvas").

I hope this helps! Also, please feel free to email me directly when you have questions.
/Brian
User avatar
Brian|Dyalog
 
Posts: 101
Joined: Thu Nov 26, 2009 4:02 pm
Location: West Henrietta, NY

Re: Transferring information out of ScriptFollows code

Postby Jinny on Mon Mar 16, 2020 1:59 pm

Thank you Brian, will email
Jinny
 
Posts: 29
Joined: Sun Jul 01, 2018 10:15 am


Return to MiServer

Who is online

Users browsing this forum: No registered users and 1 guest