On Sat, Sep 19, 2009 at 6:42 PM, Niels Mayer <[email protected]> wrote: > > My own apps partially work in IE8 with the exhibit timeplot. The actual > graphics in the timeplot don't display at all, however as you move the mouse > over, the legend and highlights display; this shows the data is "there" and > associated with display geometry, just not "painted". >
I believe I fixed one problem in IE8, potentially related to this. However, the graphics still don't display in IE8, but at least it gets one less error. In IE8, when you move the mouse around inside the timeplot, the data is presented, as expected, as a "tooltip" popup. Previously, each time you moved the mouse (or tried to do anything at all), an error would trigger, which prevented any further activity, other than closing the window (showstopper). The error was: Message: 'F._dataSource' is null or not an object Which occurs in http://code.google.com/p/simile-widgets/source/browse/timeplot/trunk/src/webapp/api/scripts/plot.js although the error occurs lower in that method, this class of error is prevented by remembering that this is JavaScript (which proudly touts its semantic heinosity at every turn), and not C. Previously the code for Timeplot.Plot.prototype.initialize() had a check right at the beginning (line 37): if (this._dataSource && this._dataSource.getValue) The error is prevented with the following instead of the above: if ((this._dataSource != null) && (this._dataSource.getValue != null)) { The error itself is in line 80-82, in mouseMoveHandler = function(elmt, evt,target ): var validTime = plot._dataSource.getClosestValidTime(t); x = plot._timeGeometry.toScreen(validTime); var v = plot._dataSource.getValue(validTime); The problem is fixed because the initial check for this._dataSource !=nullalso catches plot._dataSource being null. "plot" and "this" are aliased at line 56 with var plot = this;such that "plot" becomes part of mouseMoveHandler()'s closure. I imagine the other issues with Exhibit's timeplot in IE8 might well be as simple as this. I think the entire code needs to be gone through with a fine-tooth comb ensuring the semantics of "if (object)" in JavaScript is actually what the programmer intended. For more info, see http://constc.blogspot.com/2008/07/undeclared-undefined-null-in-javascript.html One overarching question is: does it make any sense to fix this version of timeplot that is included in Exhibit. Some of the standalone timeplot (without exhibit) demos work in IE8: http://www.simile-widgets.org/timeplot/examples/energy/ http://www.simile-widgets.org/timeplot/examples/bush/ http://www.simile-widgets.org/timeplot/examples/housing/ http://www.simile-widgets.org/timeplot/examples/immigration/ http://www.simile-widgets.org/timeplot/examples/simile/ The problem resides in Exhibit's timeplot extension. Therefore, I'm wondering if these bugs would be best fixed by upgrading Exhibit to use the latest Timeplot widget? -- Niels http://nielsmayer.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en -~----------~----~----~----~------~----~------~--~---
