First of all, I should note that I found a workaround about 20 minutes ago where instead of retrieving the ServiceLocator, I can use mx.core.Application.application.  I don't know if this is a solution or "cheating", but I saw the services retrieved like this instead of using the ServiceLocator.getInstance() in the CreditCard examples from the interation-two site.
 
this.service = ServiceLocator.getInstance().getService( "nenService" );
Solution?  Or just a workaround?
this.service = mx.core.Application.application.services.nenService;
 
Here is the content of my Services.mxml:
<!-- =============================================================== -->
<cairngorm:ServiceLocator xmlns:mx="http://www.macromedia.com/2003/mxml"
 xmlns:cairngorm="http://www.iterationtwo.com/cairngorm">
 
   <mx:RemoteObject id="nenService"
         endpoint="http://sfrwebdev/flashservices/gateway"
         source="com.littler.nen.tartan.business.RemoteService"
         protocol="http"
         showBusyCursor="true"
         result="event.call.resultHandler( event )"
         fault="event.call.faultHandler( event )">
   </mx:RemoteObject>
 
</cairngorm:ServiceLocator>
<!-- =============================================================== -->
 
Here is how I am declaring it inside my root MXML file:
First the Namespace inside my <mx:Application> tag 
xmlns:nenBusiness="com.littler.nen.business.*"
<nenBusiness:Services id="services" />
 
Thank you,
Greg Andora
 
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dimitrios Gianninas
Sent: Monday, October 03, 2005 4:12 PM
To: [email protected]
Subject: RE: [flexcoders] Problem with ServiceLocator in Cairngorm

Perhaps if you showed us your Services.mxml and how it is declared your root MXML file.
 
Dimitrios "Jimmy" Gianninas
RIA Developer
Optimal Payments Inc.
 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Andora, Greg
Sent: Monday, October 03, 2005 2:57 PM
To: '[email protected]'
Subject: [flexcoders] Problem with ServiceLocator in Cairngorm

Hello everyone,
 
I'm running into a problem using the ServiceLocator within my Delegate contructor.  The Flash Player Debugger is providing no help because it is returning an error regarding RectBorder.as and hiding the true problem.  In my code (pasted below), you can see I have an Alert.show() before and after the line used to get my service.  The first Alert is shown, the second never is.
 
Does anybody have any ideas what could be causing this?
 
/* ==============================================================
 
import org.nevis.cairngorm.business.Responder;
import org.nevis.cairngorm.business.ServiceLocator;
import mx.utils.Delegate;
 
class com.littler.nen.business.NENDelegate
{
 
 public function NENDelegate( responder : Responder )
 {
  import mx.controls.Alert;
  
  Alert.show("Before Service Call");
  this.service = ServiceLocator.getInstance().getService( "nenService" );
  Alert.show("After Service Call");
  this.responder = responder;
  
 }
 
 ==============================================================*/
 
Thank you,
Greg Andora
 
 

----

To ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com



--
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 ensure compliance with requirements imposed by the IRS, we inform you that any U.S. federal tax advice contained in this document (including any attachments) is not intended or written to be used, and cannot be used, for the purpose of (i) avoiding penalties under the Internal Revenue Code or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.

To reply to our email administrator directly, send an email to
[EMAIL PROTECTED]

Littler Mendelson, P.C.
http://www.littler.com

Reply via email to