1. only one instance -------------------->
package
{
public final class Singleton
{
private static var _instance:Singleton = new Singleton();
public function Singleton()
{
if (_instance != null)
{
throw new Error("Singleton can only be accessed
through Singleton.instance");
}
}
public static function get instance():Singleton
{
return _instance;
}
}
}
2. yes u can. use createPopup, it creates new instance everytime.
Anand
On Feb 27, 3:41 pm, sudhi <[email protected]> wrote:
> Dear all,
>
> 1) What exactly is a singleton class ???
> 2) Popupmanager class is a singleton class so can't i
> add 2 popups to the popupmanager ??
>
> I am doing a project where i am showing so many data points as a small
> rectangle.
> When the user clicks on the data point, it will produce a popup window
> with all the
> details about that data point.
>
> I have made the popup nonmodal so when the user clicks again on the
> same datapoint which already opened a popup it is giving me an error..
>
> How can i solve the above problem ??
>
> Please suggest some links or answers...
>
> Thanks and regards
> Sudhi..
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---