#7562 closed defect (fixed)
[patch][ccla] dojox.flash interface broken
Reported by: | Adam Peller | Owned by: | bradneuberg |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Storage/Flash | Version: | 1.2beta |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
There a few problems in the way the dojox.flash interface has been refactored from dojo 0.4.x. Among other things, the payload that is received on the Flash end of the interface does not exactly match the data sent from the JavaScript? side (i.e.: some strings are escaped). This makes it hard for the development of Flash programs that use this interface because the format of the data received becomes harder to predict. In particular, the dojox.storage.putMultiple implementation on the Flash provider is broken by this.
Furthermore, the way the serialization and deserialization of data sent to and from the Flash interface is not always recoverable with the current approach, as can be seen by running the dojox.flash test cases after applying the provided patch (reproduce_error.diff)
I have included a suggested patch to fix this problem where the serialization code has been simplified a little (probably gaining some performance with this, unmeasured). With this patch, all values passed from the JavaScript? interface are kept exactly in the Flash side and also returned safely to the JavaScript? side, with the single exception of special Unicode value \u0001 (which I hope it is rare enough to be found in any client code). Ideally, not even this exception would exist, but this is already much better than the current state of things.
Attachments (2)
Change History (7)
Changed 12 years ago by
Attachment: | dojox.flash-enconding.reproduce_error.diff added |
---|
comment:1 Changed 12 years ago by
Component: | Dojox → Storage/Flash |
---|
Changed 12 years ago by
Attachment: | dojox.flash-enconding.fix.diff added |
---|
patch from Julian Cerruti (IBM)
comment:2 Changed 12 years ago by
Hi Julian, I've applied the patch. The one thing I removed was the To/From? input form in the Dojo Flash tests, since those happen programmatically. Tested the updated tests on FF 3, IE 7, Google Chrome, and Safari 3 and all pass.
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Version: | 1.1.1 → 1.2beta |
---|
comment:5 Changed 12 years ago by
Thanks, Brad. That is very open from you. I think I was using those fields only at the beginning, while trying to find a repeatable error case. The programmatic loop below does cover any tests you can do in the from/to through the forms, so I think your call was a good one. Thanks again!
patch from Julian Cerruti (IBM)