Hi,

I am trying to understand the ModelLocator and how Cairngorm works.  
I have been reading, but I think I need some additional information 
on the code below if possible.

1. What is the difference between Public function and Public Static 
function.   I assume Public functions can be called from anywhere in 
the application.  But what about the "public static"

2. Any info about the ModelLocator would be helpful.

[Bindable]
        public class ModelLocator implements 
com.adobe.cairngorm.model.ModelLocator 
        {               
                private static var 
modelLocator:code.model.ModelLocator;
                
                public static function getInstance() : 
code.model.ModelLocator 
                {
                        if ( modelLocator == null )
                                modelLocator = new 
code.model.ModelLocator();
                                
                        return modelLocator;
                }
           
                //---------------------------------------------------
----------------------

                public function ModelLocator() 
                {       
                        if ( code.model.ModelLocator.modelLocator != 
null )
                                throw new Error( "Only one 
ModelLocator instance should be instantiated" );        
                }
        
                //---------------------------------------------------
----------------------
                                        
                public function initialise() : void
            {
            }

Thanks,

Malik
            





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