making mx.rpc.xml.XMLDecoder play nice with xsi:type

Posted on 8 CommentsPosted in actionscript, flex

Utilising SchemaManager and SchemaTypeRegistry one can quickly register specific ActionScript classes with specific types defined within an xml schema (XSD). Once set up it is simply a matter of using XMLDecoder and XMLEncoder to automatically serialise between XML and ActionScript and voila! the work is done…
…That is unless you happen to have elements with your xml file that use an xsi:type attribute to indicate that their contents is actually that of a derivative element (such as an extension, restriction, etc). In these cases Flex just ignores the xsi:type and decodes against the original element type – which aint much help. What’s suprisising is that the Flex classes have been built with xsi:type in mind (storing the type in custom classes implementing IXMLSchemaInstance), but just seems to have been missed when implementing XMLDecoder – always saves the element type in the xsitype property of IXMLSchemaInstance

Adobe reopens discussion around the Flex 4 namespaces and the ‘Fx’ prefix on components

Posted on Leave a commentPosted in actionscript, flex

I don’t like reposting Flex related news; however I’m please to see that Adobe have decided to revisit their original naming strategy for the new Flex 4 components.

There is a good discussion happening on their forums on Flex 3/4 component compatibility – the distinction between flex 3 and flex 4 components, namespace/naming conventions, and IDE/documentation/CSS implications.

Flex 3, XML Schemas & automatic mapping of AS classes to XSD element definitions (Part 2)

Posted on 34 CommentsPosted in actionscript, flash, flex, massive

This is a set of posts documenting my experiences with utilising functionality within the Flex SDK that provides the automatic mapping of custom ActionScript classes to element definitions within an XML Schema (XSD). 1.  Part 1 – Introduction and background 2.  Part 2 – Overview of Flex’s XML Schema classes (inc example code) Part 2 […]

Flex 3, XML Schemas & automatic mapping of AS classes to XSD element definitions (Part 1)

Posted on 5 CommentsPosted in actionscript, flash, flex, massive

This is a set of posts documenting my experiences with utilising functionality within the Flex SDK that provides the automatic mapping of custom ActionScript classes to element definitions within an XML Schema (XSD). 1.  Part 1 – Introduction and background 2.  Part 2 – Overview of Flex’s XML Schema classes (inc example code) Part 1 […]

Limitations of Drag And Drop animations in Flex

Posted on 2 CommentsPosted in flash, flex, massive, user interface

One of the key benefits of using Flex for the end user is a consistent experience when interacting with on screen elements. While the look/skin can vary greatly, the underlying behaviours remain consistent, making the site or application more usable. While Flex provides a default implementation to each step in an interaction, it generally allows […]

to Boolean || not to Boolean

Posted on 3 CommentsPosted in actionscript, massive

I was looking for an simpler way of setting default values for function parameters in ActionScript2. The way I usually do this is something along the lines of: function set value(s:String):Void { if(s == undefined) _value = s; else _value = “default”; } One option is using a logical OR operator to set default values. […]