I did the as WebService because I like the code hinting.

If I don't register for a result, I don't get one.  I think you can 
hardcoded the whole event.token.resultHandler thing in the ServicesLocator, 
but... who the hell has "default result handlers", know what I mean?  You 
typically call a method, and want to know about the result in a specific 
function, so, I specifically utilized addEventListener.

The factory is NOT necessary, but it makes it really easy to build View's 
that can show "BookVO's" vs. this XML text.  You could have the Command do 
that, but typically, any "server mess" I always put in Delegates', Factories 
included.  Commands should just call Delegates, and set data on 
ModelLocators.  It can't do that if it has to "massage" data, so I let the 
Delegate's handle all that insanity.  I do the same thing with Ruby on Rails 
and ColdFusion Pre-7.0.2.

----- Original Message ----- 
From: "ben.clinkinbeard" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 06, 2006 10:01 AM
Subject: [flexcoders] Re: WebService & Cairngorm 2 Example


You rock the freakin house dood. I've been banging my head for 2 days
trying to get this to work. Seems like my missing pieces were the 'as
WebService' in SearchDelegate and the local result handlers
(searchBooks_onResult). I don't have time to play with the code much
at the moment, so I am curious- are those necessary or are you just
using them so you can run the result through your factory before
sending back to the command class? none of the example code I saw had
handlers inside the delegate.

Thanks again! This is sooo helpful.

Ben





--
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








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
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/
 



Reply via email to