Re: [flexcoders] Cairngorm / MVC Best Practice
> We have all our Events take the current object as the first parameter > (i.e. 'this'). > The Command then calls > savedFromEventHome.onCommandName(result) > in onResult. > > Could that do what you want ? interesting. do these objects then implement some kind of interface to support the 'onCommandName(result)' method or do you type it in some other way? (casting in the command, strict all the way through etc..) martin. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Cairngorm / MVC Best Practice
Tom Chiverton wrote: > On Friday 05 January 2007 14:51, Martin Wood-Mitrovski wrote: >> do these objects then implement some kind of interface to support the >> 'onCommandName(result)' method or do you type it in some other way? > > No, you could (should ?) write an interface class and import it though, yes. > As long as we remember to make the function public rather than private it > works really well. We like it much better than the old ViewHelper way of > doing things as now your result handler code is right there with the > invocation code. So you mean that the object that invokes the service and handles the result is typed all the way through, its only the event that you have to cast in the command. I agree that having the result handler next to the invocation is preferable, im not sure if its really worth the trouble of creating an interface for this, after all it seems unlikely to need that flexibility...unless of course at some point you wanted to shift the result handlers into their own class or something.im getting dangerously close to rambling.. ;) Anyway..i'm still getting to grips with the Cairngorm style and how best to bend it to my will, so its interesting to see other choices and implementations. Also this way matches my AS2 setup much more closely as well which is nice. :) Martin. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Cairngorm ServiceLocator
the cairngorm service locator just checks to see if it has a property with the name of the service defined if(this [ serviceId ] == null) // throw an error if it exists then just return it : return this[ serviceId ]; its a common actionscript technique to access object properties dynamically using the [] notation. and the relationship between mxml and an actionscript class is that mxml is converted to actionscript, so an mxml file / component is an actionscript class. hope that helps, its one of those things that after using AS for a while you internalise so my explanation might be lacking. Martin [EMAIL PROTECTED] wrote: > I'm a little confused. > > > > How come I can ask com.adobe.cairngorm.business.ServiceLocator for a > service from an MXML component which is a "sub-class" of ServiceLocator? -- Martin Wood http://relivethefuture.com/choronzon
Re: [flexcoders] Cairngorm Duplicate Remote Object Return Events
> One theory I have about what 'might' be happening is that before I make > my servce call, I'm adding event listeners for the result/fault and > these may be duplicate ones, because the remote object instance is being > persisted in ServiceLocator. However, I tried explictly removing the > listeners before adding them and no dice. sounds like the most likely thing to be happening. try setting a breakpoint on where you remove / add the listeners and check that the references are the ones you expect, i.e. you are not trying to remove a different listener or something.
Re: [flexcoders] Code behind- do you use it?
> So what are others doing? No AS in your MXML files, no code behind, a > mixture of the two? I use it practically 100% of the time. If the mxml file only has a small amount of code and is unlikely to expand then its probably overkill but for anything with more than a couple of methods i use it. martin.
Re: [flexcoders] antlr for as3? parsers?
the metaas project has an antlr grammar for as3. Im not sure how complete it is, but its probably a good start. http://www.badgers-in-foil.co.uk/projects/metaas/ Aldo Bucchi wrote: > or something similar?? > > need to make a parser for a rather complex EBNF grammar, and by hand I > have only gone so far... > > thx, > Aldo
Re: [flexcoders] antlr for as3? parsers?
im not sure but i think David based his on Martin's work. I seem to remember a thread on OSFlash back in the mists of time where they discussed it. but, I could be completely wrong and the Metaas grammar could be completely different (well, as different as two grammars for the same language are likely to be) :) Carlos Rovira wrote: > In the ASDT project there's one too. You should ask Martin Schnabel to get > more info... >
Re: [flexcoders] Re: Using Flash For Authoring Flex 2 Content -- A Definitive Guide?
michael.ritchie wrote: > I keep asking Jesse why the hell he don't write a book about this > stuff, something about attention span I used Jesse's blogs to > make skins for work at my oufit, the dude rocks. We need to have > more information out there on how to make better Flex applications > with Flash. Jesse is on the cutting edge of this. and if he writes a book he might start keeping the good stuff for the book and not blogging it, so best not encourage him :)
Re: [flexcoders] Ogg Vorbis Tremor in AS3?
Its been done. :) http://flash.j-ogg.de/ Hopefully the source will be released at some point. I know that its built on top of the audio engine made by Chris Sperry of FlashCodersBrighton fame. http://www.flashcodersbrighton.org/wordpress/?p=9 There is a version of the core audio engine in the SID branch of the FC64 project if you are interested in seeing some source. (and it includes the sample rate fix) Chris said that he has made some improvements to the engine but they are not public yet, hopefully these will be released soon. for now thats all I know :) martin. Kevin Newman wrote: > Hello, > > I was wondering what the feasibility of porting an integer based audio > decoder like Ogg Vorbis Tremor to Actionscript 3 is. Are there APIs in > place that would allow you to load a vorbis file, decode it and output > the audio? Does AVM2 have the horse power to pull off something like that?
Re: [flexcoders] Modules and Cairngorm
I just had the same error and it was because i was trying to re-use event instances rather than dispatching new ones each time. But i wasnt using modules, just a normal Cairngorm app. I was going to look into it to find out exactly what was happening but I just dont have the time at the moment. maybe this is enough of a clue for someone else to say why :) Bjorn Schultheiss wrote: > Hey Can anyone give me the lowdown on this error > > TypeError: Error #1034: Type Coercion failed: cannot convert > flash.events::[EMAIL PROTECTED] to com.adobe.cairngorm.control.CairngormEvent.
Re: [flexcoders] Organize imports
Stembert Olivier (BIL) wrote: > Ho all, > > Do you know how to organize imports in FlexBuilder? CTRL + SHIFT + O :)