Tim, I hear ya. We'll have a discussion in-office this week about making the stateless Command implementation available as a patch for now, and give everyone using Cairngorm an opportunity to voice opinion on the implementation.
We're already using the stateless command on our own projects; we just hadn't released this into the Cairngorm code-base yet. Best, Steven -- Steven Webster Practice Director (Rich Internet Applications) Adobe Consulting Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK p: +44 (0) 131 338 6108 m: +44 (0) 7917 428 947 [EMAIL PROTECTED] > -----Original Message----- > From: flexcoders@yahoogroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff > Sent: 17 April 2006 17:47 > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Cairngorm2 Commands and Singletons > > Apparently, there has been much discussion concerning > singletons here already, but the search feature of this site > doesn't seem to ever return complete results. Coming from a > .NET background, I've had to change a lot my thinking in > regards to objects. This is a good thing. However, in .NET > (VB.NET, C#.NET Java.NET) when an object is instantiated, > let's say a class in this case, as soon as the object goes > out of scope, it is automatically disposed of by the > garbageCollector. This doesn't seem to be the case in AS3. > I've patterned an application on the Cairngorm samples that > have been provided so far. The samples are great and I > really appreciate them, but none of them make multiple calls > to the back-end. Using the code provided, if I execute > multiple search commands (let's say getAuthors), each one of > the command instances, along with the associated event > listeners and objects, still exist after the result or fault > is returned. Thus, when an error is displayed > like: "Sorry, no authors found.", since all of the > commands/delegates are still listening to the data service, a > separate alert box appears for each instance of the command. > Three calls, three alert boxes. > > I'm not sure if I should make the commands and delegates > singletons, or manually dispose (delete _oSingleton) of the > instances. Since the application is Cairngorm based, I don't > want to stray too far from best practices. I was just > wondering if anyone else had experienced this problem and if > there were some links or advice that could be offered? I > also want to say that I think that the Adobe team is doing a > great job. I can't wait for the release of Flex2. > It's going to turn a lot of heads. > > Many thanks, > Tim Hoff > > P.S. It would be nice to have something like the following: > > public singleton class myClass {} > > > > > > > > > -- > 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 > > > > > > > -- 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/ <*> 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/