[flexcoders] Confused if I should use Classes or Packages?? (Cairngorm specific question)
Hello All, In scouring all my Cairngorm examples, I am seeing 2 distinct methods of creating the Delegates (under com.adobe.cairngorm.business). One method uses a Class - like so: --- import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; import mx.utils.Delegate; class com.adobe.cairngorm.samples.store.business.CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } --- The other method uses a Package - like so: --- package com.adobe.cairngorm.samples.store.business { import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; public class CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } } --- Could anybody indicate whether I should use one or the other? And if there is a definite answer, why I should do it a particular way? Was this something that changed with newer version of Cairngorm? Thanks in advance for all your help, Mike -- 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/
Re: [flexcoders] Confused if I should use Classes or Packages?? (Cairngorm specific question)
Hi Mike, the first example is AS2/Flex 1.5 and the second one is AS3/Flex 2 Cheers, Ralf. On 8/4/06, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, In scouring all my Cairngorm examples, I am seeing 2 distinct methods of creating the Delegates (under com.adobe.cairngorm.business). One method uses a Class - like so: --- import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; import mx.utils.Delegate; class com.adobe.cairngorm.samples.store.business.CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } --- The other method uses a Package - like so: --- package com.adobe.cairngorm.samples.store.business { import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; public class CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } } --- Could anybody indicate whether I should use one or the other? And if there is a definite answer, why I should do it a particular way? Was this something that changed with newer version of Cairngorm? Thanks in advance for all your help, Mike -- 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 -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany -- 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/
RE: [flexcoders] Confused if I should use Classes or Packages?? (Cairngorm specific question)
Thank you SO much! I prefer the 2nd method anyway, so all the better :) Many thanks - and I appreciate the rapid reply, Mike -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Bokelberg Sent: Friday, August 04, 2006 2:24 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Confused if I should use Classes or Packages?? (Cairngorm specific question) Hi Mike, the first example is AS2/Flex 1.5 and the second one is AS3/Flex 2 Cheers, Ralf. On 8/4/06, Mike Anderson [EMAIL PROTECTED] wrote: Hello All, In scouring all my Cairngorm examples, I am seeing 2 distinct methods of creating the Delegates (under com.adobe.cairngorm.business). One method uses a Class - like so: --- import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; import mx.utils.Delegate; class com.adobe.cairngorm.samples.store.business.CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } --- The other method uses a Package - like so: --- package com.adobe.cairngorm.samples.store.business { import com.adobe.cairngorm.business.Responder; import com.adobe.cairngorm.business.ServiceLocator; public class CreditCardDelegate { private var responder : Responder; private var service : Object; public function CreditCardDelegate( responder : Responder ) { this.service = ServiceLocator.getInstance().getService( creditCardService ); this.responder = responder; } } } --- Could anybody indicate whether I should use one or the other? And if there is a definite answer, why I should do it a particular way? Was this something that changed with newer version of Cairngorm? Thanks in advance for all your help, Mike -- 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 -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany -- 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/