So last night, I was running my physics lab and everything was going along smoothly. Students had updated OT/JSvg or installed it for the first time without any issues and were busily collecting data. Code editing went smoothly: students entered their data into arrays and were plotting the results, when one of the students running Windows noted that the left hand panes where one can click to view recent graphs had stopped working. After going around to all the machines which I had dutifully updated to FF26.0 and OT/JSvg 0.11.3, I saw that it was true for all the Windows users. The sole MacOSX person had no such problem nor did I (running Linux).
The code does OS detection as it loads and sets the variable OS with its findings. Then later when OS specific code is run, it makes use of this. It was clear that this was borked. After some exploring I found that there is new (??) internal object called OS which contains a wealth of info about the operating system. Therefore, tests as such:
if (OS == 'Windows') {
// Do windowy stuff here
} else {
// Do posix (Linux/MacOSX) stuff here
}were breaking since OS was an object and not a string. Having discovered this, I fixed the JSvg part of the code (for a quick release) and am now moving into looking at the OT portion.
While I was at it, I pushed forward some cosmetic changes to the Analysis Console to make things more findable or otherwise legible. There are now also tooltips for all the buttons. Here's a preview:
Graph of last night's data with updated GUI. |
No comments:
Post a Comment