Hi Velo,

I have set up my AIR project to build using flexmojos and everything
was looking okay, until yesterday I noticed a problem around loading
objects from a ByteArray which I can't seem to get around. My project
is quite complex, but essentially the part in question consists of 3
artifacts:

- a common swc file
- the air application itself
- a module that the air application loads (packaged as a swf).

The common swc is included as a dependency in both the other two.
Everything builds correctly and runs correctly first time.  The Air
application is launched and loads the module swf (the whole thing acts
as a mini application running on an underlying framework that
abstracts the difficult/common activities and allows them to be done
in a controlled fashion).

At a certain point the swf module will want to persist its data and
calls the air application to do this for it.  The data is saved into a
local SQLLite database and is written out as a Dictionary object.  The
module has all of its classes that could be persisted annotated with
[RemoteClass] so that the object can be read back in as a typed object
later.

The save happens fine but when, later, it is read back in (using
byteArray's readObject()), it does not retrieve it as a typed object
and we get a type coersion exception.

If I compile and run this through FlexBuilder 3, I don't get this
behaviour, and it all works fine.  There is a difference in size
between the .air files generated by each approach but I can't isolate
what options might be different.

I tried including the -keep-as3-metadata for RemoteClass and other
standard metadata tags, but it doesn't seem to make a difference.  I
also tried replacing the metadata annotations with
registerClassAlias() calls but again no luck

Actually, I can use the swf module built with flexmojos (which has the
RemoteClass meta tags in it) along with the AIR file built from
Flexbuilder and it works fine.

Is there a possiblity that there are some fundamental differences in
behaviour between the compilers being used or is it just all about the
compiler options provided?

Thanks

Steven

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en

http://flexmojos.sonatype.org/

To unsubscribe from this group, send email to 
flex-mojos+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to