[Update] i updated this example to stay in line with the flex example, using a [PostConstruct] metadata, and not dispatch a "onApplicationReady" event [/Update]
This is another basic example of Parsley 2.0.
This time without using the Flex framework (ie: pure AS project), which makes the whole thing a bit more complicated.
(here is the flex version )
The wiring mechanism for views in flex (dispatch a bubbling event) doesn't work in flash so you have to declare all your views (well.. the ones that need to be wired of course...) in the context (see Beans.xml in the source for example).
As stated in the flex example, this app is useless and ugly, but it shows a way of setting up a MCV app with Parsley. I chose not to use a Mediator/PresentationModel as it would have over complicated the example without adding anything new to show.
Right click for source
You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.
the workflow is kind of the same as in the flex example but well.. without the flex features :)
No bindings, so we use a global message to dispatch model changes, no easy view wiring so we declare them in the context, etc...
check the other example for a more detailed explanation.
it also logs to SOS console but this time, using Parsley built-in mechanism.
Comments
Hi,
Thanks for posting this - you're one of the few people online who've published any sort of entry level example!
Naturally, being a newbie, i can't get it to work :-( I've tried your source files with parsely v2.0.0 and v.2.1.0 but i get this error:
Error: Expected exactly one [Metadata] tag on Class org.spicefactory.lib.reflect.metadata::EventInfoat MetadataClassRegistration()
at org.spicefactory.lib.reflect::Metadata$/registerMetadataClass()
at org.spicefactory.lib.reflect::Metadata$/initialize()
at org.spicefactory.lib.reflect::Metadata$/registerMetadataClass()
at org.spicefactory.parsley.metadata::MetadataDecoratorAssembler$/initialize()
at org.spicefactory.parsley.metadata::MetadataDecoratorAssembler()
at DefaultDefinitionRegistryFactory/create()
at org.spicefactory.parsley.core.factory.impl::DefaultContextStrategyProvider/get registry()
at org.spicefactory.parsley.core.context.impl::DefaultContext()
at DefaultContextFactory/create()
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/createContext()
at org.spicefactory.parsley.core.builder.impl::DefaultCompositeContextBuilder/build()
at org.spicefactory.parsley.xml::XmlContextBuilder$/buildAll()
at org.spicefactory.parsley.xml::XmlContextBuilder$/build()
at OrthrusOS/_initApp()
at OrthrusOS/_onAddedToStage()
at OrthrusOS()
Any ideas? thanks in advance!
-h
Post new comment