The code is opensource so you can see how it works... here's the call it
makes. (This is cairngorm v2)

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Friday, January 05, 2007 10:53 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Cairngorm ServiceLocator

 

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?

 

i.e.:

Services.mxml:

<cairngorm:ServiceLocator ...>

            <mx:WebService name="myService" ... />

</cairngorm:ServiceLocator>

 

 

var theService =
ServiceLocator.getInstance().getWebService("myService");

 

 

How does ServiceLocator know what a "myService" is?  It's not defined in
ServiceLocator.as.

 

It works, I just don't understand why...  What is the relationship
between an MXML file and an AS class that makes this happen?

 

Jay Proulx

Application Developer

Internet Delivery Services - eVision Team

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

(613) 783-6711

 

 

Reply via email to