Ray Johnson wrote:
> This statement helps a ton!
>
> I now have a little function that can reload the data in my exhibit.
> Looks like this:
> function reloader () {
> Exhibit.UI.showBusyIndicator();
> window.database.removeAllStatements();
> var importer = Exhibit.importers["application/json"];
> importer.load("GetActiveCalls.aspx", window.database,
> function () {Exhibit.UI.hideBusyIndicator();});
> }
>
> It reloads the data great! The only issue right now is that the
> showBusyIndicator does not seem to be working. I see the exhibit go
> blank - a good pause and then the new data shows up. It would be nice
> to show the busy thing during that pause. Am I missing something?
>
This is because after showBusyIndicator is called (to show the working
message), importer.load(...) gets the result too soon before the web
page has a chance to re-render itself. Maybe you can do something like this:
function reloader () {
Exhibit.UI.showBusyIndicator();
window.setTimeout(
function() {
window.database.removeAllStatements();
var importer = Exhibit.importers["application/json"];
importer.load(
"GetActiveCalls.aspx",
window.database,
function () {Exhibit.UI.hideBusyIndicator();}
);
},
100 // milliseconds
);
}
David
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general