The workaround of “_go” could be a good idea, but the problem is
that I couldn’t have the list of all the mapped functions from
netlogo to javascript (right?).
I'm not seeing the problem. I guess it would help me to know what you
wish to do with this list of mappings.
If you went here
<https://github.com/NetLogo/Galapagos/blob/master/app/models/ModelSaver.scala#L25-L30>
and added a line that said |val nlToJSIdentMap =
compiledModel.procedures.map { case (name, _) => name ->
org.nlogo.tortoise.JSIdentProvider(name) }|, that would create you a map
of (capitalized) NetLogo procedure names to the names that the
procedures will be given in the output JavaScript. Does that help with
the problem?
At the begining I tried to refresh every “view action” to try to
have the instances of model synchronized. I didn’t get it, because I
didn’t know exactly what to change to make it work.
The periodic updates of the GUI occur here
<https://github.com/NetLogo/Galapagos/blob/master/app/assets/javascripts/TortoiseJS/control/session-lite.coffee#L41-L58>.
On 4/26/2015 11:52 AM, Oscar Martinez wrote:
Oh, I see. Now I understand it. My idea was to add websockects code to
the pre-compiled functions of netlogo files, but based on what you say
is not 100% good idea (it's not easy to get it).
The workaround of "_go" could be a good idea, but the problem is that
I couldn't have the list of all the mapped functions from netlogo to
javascript (right?).
May be the best option it's to change where to put the websockets
code. At the begining I tried to refresh every "view action" to try to
have the instances of model synchronized. I didn't get it, because I
didn't know exactly what to change to make it work.
Thanks,
On Saturday, April 25, 2015 at 11:12:32 PM UTC-6, Oscar Martinez wrote:
Hi,
I have been investigating about Galapagos/Tortoise, because my
idea it's to connect two different session of Tortoise through Web
Sockets. By the moment, I have gotten take a pre-compiled model
and modify it to have two different sessions using NodeJS. I also
have a local intance of Galapagos, running and generating savable
JS tortoise models.
The new step in my project is to modified the JS code generated by
Galapagos to add my custom code, automatically. But, I haven't
found where the .nlogo code is compiled. I have checked the scala
files, and I pretty sure it's near of
<models.ModelCollectionCompiler> in line 36
<CompiledModel.fromNlogoContents(contents).map(ModelSaver(_))>,
but I haven't understand exactly what's next.
Kind regards,
--
You received this message because you are subscribed to the Google
Groups "netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.