Every so often, something goes your way, ya know? So, last Thursday, I posted to sakai-dev asking whether I should use dojox.storage or borrow some stuff from rWiki:
http://www.nabble.com/Flash-storage—-dojo.storage-or-homebrew–td16033853.html
It also just so happens that the main guy behind dojox.storage, Brad Neuberg, apparently felt like being a kind soul, did a ton of refactoring work, and bundled up the smallest, most practical package possible for my immediate need and posted it, not three hours later:
http://codinginparadise.org/weblog/2008/03/easy-download-of-dojo-storage-for.html
So far, it’s really easy to use (about 15 total lines, and tastes like HashMap) and moves between browsers very well. I’m only having one issue on IE. It’s choking on line 52 of some unnamed file that a little Googling hints is related to the Flash plugin. (For the curious, it’s an Object Required error in __flash__removeCallback()…)
I guess this can happen with different ways of including SWF files — the confusing bit is that one thread says use the HTML embedding, rather than JavaScript, and another says to use JavaScript rather than HTML. The tricky part is that both seemed to fix it.
So, I’m going to test on a machine that doesn’t have script debugging turned on and hope for the best. If it doesn’t grumble too badly, I’ll poke around for a fix in my spare time.
Either way — Cheers, Brad! You really made my day. -NB
7 comments ↓
Hey there, that’s strange. What version of IE and Flash were you using? BTW, ExternalInterface (how we do Flash/Ajax communication) doesn’t work correctly on all browsers unless you embed Flash correctly. Tell me if you get things working, and if you want to help also test on Safari and Firefox and see if your change works on those browsers as well.
Thanks for the nice comments
Best,
Brad
BTW, what are you hacking on? Would be cool to see what you are building with Dojo Storage.
Also, you should check out Dojo Offline, my other project
We’re seeing this on IE6 and IE7. I just verified that it’s happening on:
* IE 7.0.5730.11CO
* Flash 9,0,45,0
The context is autosaving of FCKeditor content within Sakai MetaObj forms to be used within an OSP Portfolio Template. The “object required” error occurs on unload of an iframe. In Sakai specifics, it would happen with any tool navigation. If the portal window does not move, but the tool does, the error fires. It’s also happening on a SimpleModal dialog box.
We’re seeing a new problem that seems to be based on system-level/IE permissions. The general lab machines will run the Dojo 0.4.1 demo with no trouble, but won’t initialize the Flash storage. I’m assuming this is related to the new version trying for Flash 8 with some different security implications.
Hey, the ZIP file I posted last week had some issues. Download the latest one at http://codinginparadise.org/weblog/2008/03/updated-dojo-storage-zip-file-demos.html and see if that works better. Also, the new refactored version only supports Flash 8+, whereas the old Dojo 0.4.1 supported Flash 6. I dropped support for Flash 6 since things have revved pretty well and it was just too complex to support and created too much bloat. What version of Flash is being used in the computer labs? Sounds like they have really old versions of flash.
Well, the machines are on Flash 9,0,16,0. I’m not sure of that constitutes a really old version or not, to be honest. I’ve cornered the problem and hope to know exactly what’s causing it today.
Thanks for the update! I’ll try the new zip OOTB.
For a Sakai-specific note, I’ve got Dojo 0.4.3 stashed in Resources, and a Web Content tool pointing to test_storage.html. In that scenario, it’s working. When using a custom form creation renderer, pointing to the same dojo.js, the storage manager never fires the loaded event.
Interestingly enough, the new test page hosted on Brad’s site is working on the problematic machines.
Also, the test machine I’m on is at Flash Comm Ver 9.115.
I’ve got some more debugging to do, but it’s a pretty narrow space now. Something about how MetaObj kicks things off versus a regular HTML page from Resources seems to be causing the dysfunction.
Leave a Comment