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: <[email protected]>
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