What about something like this?


[Bindable]
public class ShopModelLocator implements ModelLocator
{
private static var modelLocator : ShopModelLocator;

public static function getInstance() : ShopModelLocator
{
if ( modelLocator == null )
modelLocator = new ShopModelLocator();

return modelLocator;
}

            public function ShopModelLocator()
            {
                  if ( ShopModelLocator.modelLocator != null )
                        throw new Error( "Only one ShopModelLocatorinstance
should be instantiated" );
            }

public var products : ICollectionView;
}



|---------+----------------------------->
|         |                             |
|         |  "jrjazzman23"              |
|         |  <[EMAIL PROTECTED]>    |
|         |  Sent by:                   |
|         |  [email protected] |
|         |  07/14/2006 02:27 PM        |
|         |  Please respond to          |
|         |  flexcoders                 |
|         |                             |
|---------+----------------------------->
  
>-----------------------------------------------------------------------------------------------------------------------------|
  |                                                                             
                                                |
  |      To: [email protected]                                         
                                                |
  |      cc:                                                                    
                                                |
  |      Subject:  [flexcoders] ModelLocator - Cairngorm 2                      
                                                |
  
>-----------------------------------------------------------------------------------------------------------------------------|




I can't get the reference implementation to compile (pasted below).
Seems to be missing a constructor. How should this be solved keeping
in mind that private constructors aren't supported?

[Bindable]
public class ShopModelLocator implements ModelLocator
{
private static var modelLocator : ShopModelLocator;

public static function getInstance() : ShopModelLocator
{
if ( modelLocator == null )
modelLocator = new ShopModelLocator();

return modelLocator;
}

public var products : ICollectionView;
}








---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------

------------------------ Yahoo! Groups Sponsor --------------------~--> 
See what's inside the new Yahoo! Groups email.
http://us.click.yahoo.com/2pRQfA/bOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

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

Attachment: pic01723.gif
Description: GIF image

Reply via email to