Ticket #2572 (new enhancement)
Opened 2 years ago
sharing logic is broken
|Reported by:||rgs||Owned by:||rgs|
|Priority:||Unspecified by Maintainer||Milestone:||Unspecified by Release Team|
|Severity:||Unspecified||Keywords:||turtle art clean up|
In my latest set of patches  I broke the sharing logic causing events to be sent over even when we are not sharing. The sharing() method in TurtleArt/tawindow.py needs to be reworked to adapt to our current scenario of common sharing logic between our Sugar and Gnome code paths.
This bug also triggered another discussion, the logic to dispatch commands and then send the event across the network is redundant and confusing. One of the key points of confusion is the fact that each method in tacanvas needs a share parameter to know if the command being ran is local or is being executed on behalf of some other turtle in the network.
Upon discussion on #sugar an idea came up to simplify this logic and centralize various actions related to command execution.
We could have a queue where all commands, local and remote, would be saved to and then at some later point a command scheduler would be invoke to:
1) draw the command
2) notify turtles over the network of the executed command
3) perform logging
4) highlight the executed block
5) do some user configured action upon each command execution