Once again, Jester comes through in the clutch.

As an aside, I was able to use an AS class that subclassed
ServiceLocator also, but I like the option of mixing better. The
reason I am exploring this is because I have a need for dynamically
loaded WSDL paths, and apparently you can only do that in
mx.rpc.soap.WebService, not in its MXML cousin. I don't have time to
thoroughly test that theory tonight (although preliminary tests look
very promising), but will update that thread
(http://groups.yahoo.com/group/flexcoders/message/42536) once I get
some definitive answers.

Thanks again Jesse,
Ben



--- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote:
>
> Things are fuzzy right now, but define them as properties and setup
'em up 
> in some kind of init function, like so:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml"; 
> creationComplete="initServices()">
> <mx:Script>
> <![CDATA[
>     public var myService1:AbstractService;
> 
>     protected function initService()
>     {
>         myService1 = new AbstractService();
>         // blah blah blah
>     }
> 
> ]]>
> </mx:Script>
> </cairngorm:ServiceLocator>
> 
> 
> ----- Original Message ----- 
> From: "ben.clinkinbeard" <[EMAIL PROTECTED]>
> To: <flexcoders@yahoogroups.com>
> Sent: Friday, July 07, 2006 11:01 PM
> Subject: [flexcoders] Defining services in AS in ServiceLocator
> 
> 
> Hello, I am trying to define a WebService in AS within my
> Services.mxml file but am getting some odd errors. Any time I try to
> access a variable I have defined, it throws an error saying 'Access of
> undefined property blah'. Do I have to define all my services in an AS
> class that subclasses ServiceLocator? Here is my Services.mxml:
> 
> <?xml version="1.0" encoding="utf-8"?>
> <cairngorm:ServiceLocator xmlns:mx="http://www.adobe.com/2006/mxml";>
> <mx:Script>
> <![CDATA[
> public var q:Boolean;
> q = false; // this throws an error
> ]]>
> </mx:Script>
> </cairngorm:ServiceLocator>
> 
> Any help is much appreciated.
> 
> 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
>







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