Sorry, it's not apparent from just this information what's going wrong.
I think I'd need to see more about what the code on the page is doing in
order to tell you what's going wrong.
That said, the fact that only part of `setup` is being done suggests to
me that /maybe/ an exception is being thrown before the NetLogo Web code
finishes everything it has to do. Have you checked the JS console for
errors?
On 11/27/2015 10:46 AM, Oscar Martinez wrote:
Hi all,
Since some months ago I have been working in a University project
where I have overwrite some of the models logic to make two remote
instances being synchronized. But I have a bug when I try to start the
simulation, because it's necessary to click twice the setup button to
make remote simulation work.
When I click the setup button the first time, the remote instance
receives the signal and prepares the "ticks" output (set it as 0) and
immediately the local instance sends an "apply update" signal. But it
doesn't prepares the simulation window. After the second click on
setup button, the local instance sends again a "setup" and "apply
update" signal and now remote instance prepares the simulation windows
and I can click on go button to start. I'm not sure if this
explanation is clear.
Attached how the remote simulation looks when:
1. Local user has not clicked on setup (no-setup.jpg)
2. Local user clicks on setup the first time (first-setup.jpg)
3. Local user clicks on setup again (second-setup.jpg)
My code is something like this:
procedures.setup_ = procedures.setup;
AgentStreamController.prototype.applyUpdate_ =
AgentStreamController.prototype['applyUpdate'];
procedures.setup = function () {
if (isLocalInstance) {
sendRemote('setup');
}
procedures.setup_();
}
AgentStreamController.prototype.applyUpdate = function (modelUpdate) {
if (isLocalInstance) {
sendRemote('applyUpdate', modelUpdate);
}
AgentStreamController.prototype.applyUpdate_(modelUpdate);
}
Thanks,
--
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.