colinlin1982 / maashaack

Automatically exported from code.google.com/p/maashaack
0 stars 0 forks source link

registerClassAlias Missing from avmglue #197

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. it's not there!
2. maybe I can try to write it...
3. I will try =\

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by vcut...@gmail.com on 22 Jul 2011 at 8:12

GoogleCodeExporter commented 9 years ago
it is missing on purpose

registerClassAlias() works with AMF when you send/receive data to an AMF gateway
so custom type can be serialized/deserialized by AMF

so far, redtamarin does not support AMF serialization/deserialization (with 
ByteArray)
(a lib in AS3 is planed but not there yet)

even when this AMF lib will be added it is unlikely we will support "custom 
types" with AMF
(we can try but no guarantee)

as an alternative, using eden
http://code.google.com/p/edenrr/wiki/edenFeatures
will allow you to serialize/deserialize custom types
(the next update of eden will produce an eden.abc that will work with 
redtamarin)

now we could define a mock for registerClassAlias()
but it will do nothing

Original comment by zwetan on 22 Jul 2011 at 9:30

GoogleCodeExporter commented 9 years ago

Original comment by zwetan on 22 Jul 2011 at 9:31

GoogleCodeExporter commented 9 years ago
I also noticed that ByteArray.writeObject() doesn't work. I would be interested 
in trying to help write a byte array AMF serialization/deserialization for red 
tamarin. I have been reading and researching AMF a lot lately. Would the 
serializer be written in actionscript or written in C? 

Original comment by vcut...@gmail.com on 22 Jul 2011 at 7:09

GoogleCodeExporter commented 9 years ago
yes writeObject() and readObject() are not there in the ByteArray class

and there is a plan to write an AMF lib in AS3

if this lib, once written, revealed to be too slow then yes it would be possible
to move some parts or all of it to C++ to make it faster

But this raise also another problem, AMF serialization/deserialization
is used in other parts of the Flash API

  * SharedObject
  * NetConnection / remoting
  * LocalConnection

an AMF lib would need to to support all of those scenarios to be really useful,
not only the ByteArray scenario

Original comment by zwetan on 23 Jul 2011 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by zwetan on 24 Sep 2011 at 5:12