Does anybody have an idea about how to fix this bug, and related bugs in the Exhibit timeplot extension? (see my quoted message below). I'd like to commit the fixes I've done so far, but there's really no point in putting out a "release" (even if on trunk) that we know is broken on a significant portion of the world's browsers. I've been testing with and expecting to support at least the following platforms in: IE7, IE8, Firefox 3, Firefox 3.5, Chrome, Safari. Another question is how much of this fixing is duplication of effort? Isn't the trunk version of "timeplot" different than the timeplot-extension used by exhibit? Have similar fixes been applied to the trunk timeplot that haven't propagated into the exhibit timeplot? Who owns "timeplot" ?
Regarding Exhibit's timeplot, there's already clear cross-browser differences in this widget's "plotting" and "graphics" capabilities so this is the obvious place to look for the source of IE bugs. For example, Chrome doesn't display any vertical "grid" related to the time-axis labels, other than the first and last ones, which appear properly with a "fade" into the background color as you move away from the time-axis labels. Firefox 3 and 3.5 display the vertical grid properly with "fade." IE7 displays the time-grid without the "fade," making it quite ugly -- one's data appears as if in jail :-). However, IE7 displays the values grid properly. And IE8 -- dysfunction-winner of them all -- displays nothing other than the legends and the values and their appropriate location as you move the mouse over. IE8 is missing all "grid" markings, both horizontal and vertical. Does anybody have any suggestions for the most effective ways of debugging these problems in IE? sprinkling alert() and printing to console all over the source doesn't sound that appealing for this class of problem -- undoubtedly invoking some "software-Heisenberg uncertainty principle" in the process.... And the last time I fixed an Exhibit bug for IE, it came from reading the source, and getting rid of a special-case for IE that didn't make sense, and must have applied to a previous version (IE5 or 4?). Something like Chrome's Developer->Javascript Console would be great ... Chances are, it's something totally trivial like a graphics mode (transparency?) that IE8 doesn't support, and instead of telling you about it, just silently fails. Or, it's a lurking "if (!object)" or "if (object)" in the code that's triggering "false" on "0" or "" that is returned by some failing IE8 component. Niels http://nielsmayer.com On Sun, Sep 20, 2009 at 1:00 PM, Niels Mayer <[email protected]> wrote: > 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 > withvarplot > = 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 -~----------~----~----~----~------~----~------~--~---
