Thank you for your response, but I'm not able to understand the first part. I think it somehow replaced parts of your response with links to this forum post (how very odd).
I may be missing something (entirely possible *chuckle*), but as to serializing BitmapData, to the best of my knowledge, any entity that extends Object (Object is the superclass for BitmapData) can be serialized for Action Message Format.
I'll try to research more, because very often I do find that I'm mistaken in my understanding.
The version that came into my email notification had a bit more information. I think yes, that you're right, that I needed to capitalize the metadata tag. I'm going to scream if that's the reason and the pre-compiler never even gave a warning. Thanks. I'll let you know and mark you as the answer if that resolves it.
Well, metadata is not restricted to a known set of keywords. There are some the compiler knows about, but you are allowed to add your own, as many MVC and other application frameworks did.
1 person found this helpful
Somewhere I think we documented that displayobjects are not serializable. I don’t know if BitmapData counts among that or not, but I wouldn’t be surprised if it doesn’t reconsititute itself.
I think that I've shown pretty conclusively that it would never hurt for a pre-compiler to at least generate a warning on any one might 'add'... something along the lines of
'XXXX' does not match internally defined metadata tag name. Ignore this warning if 'XXXX' represents a user-defined metadata tag name.
Ah well. Two weeks of frustrating hell and angry boss because I chose to copy an example rather than type it out and possibly have caught the error if the code introspection had failed to popup like it does if one begins to add [Binda... or similar.
I'm really frustrated at documentation for readObject() writeObject() methods that make absolutely NO reference to the not-un-complex details that needs must be gotten right for serialization and deserialization... Only via third-party examples, forum replies, etc does anyone find anything-like that which should be in the internal documentation. I'm all the more frustrated at methods that throw NO ERROR when used incorrectly... I doubt very very much that anybody EVER wants to write a 'null' object and read a 'null' object.
Ah well. Over the last year and a half I've stopped expecting even a modicum of documentation that's of any help to anyone who does not already know all the methodology/technique/pitfalls..... it is usefully only as a memory aid when one has not memorized every detail of the API.
AIR far worse than AS3
Mobile FAR FAR worse than AIR.
I'm still confused. How is BitmapData a DisplayObject? The documentation says:
Package flash.display Class public class BitmapData Inheritance BitmapData Object Implements IBitmapDrawable
Is the Implementation of IBitmapDrawable what causes it to be a DisplayObject, or does that arrow between BitmapData and Object not represent an entire inheritance tree, but instead just the Alpha and the Omega, the beginning and end, as it were?
Either way, by this point I had been using ByteArray(s) in my serializable value object, and I'm pretty certain that they are not displayobjects (If they are, then I REALLY don't know what I'm doing *chuckle*... I'm beginning to wonder.)
Ah yes, you are correct that BitmapData is not a DisplayObject. But did it serialize correctly? I don’t trust that anything in the flash.display package will. Almost everything in that package is backed by non-AS objects internal to the player.
I'm afraid that I dont have time to persue it further right now as I'm back to saving separate XML, Jpg Image, and Jpg Thumbnail files.
I want to add to this post as I marked it as "The Answer" though it does not indeed contain the answer directly, for those who come looking for simliar solutions.
harUI prompted me to realize that my metadata term needed to be capitalized (RemoteClass instead of remoteClass). As the metadata tags may be user defined, the compiler throws no errors (or warnings *grumble*)
// [remoteClass(alias="PTotmImageVO")] incorrect
public class PTotmImageVO