Any help would be greatly appreciated!
--- In [email protected], "tchredeemed" <[EMAIL PROTECTED]> wrote:
>
> I have created a SingletonEnforced class to hold variables that might change,
> but will be
> correct no matter where I access them.
>
> public class GCManager {
>
> private static var _instance:GCManager;
>
> public var currentId:int;
>
> public function GCManager( se:SingeltonEnforcer):void {
> return;
> }
>
> public static function getInstance():GCManager {
> if(!GCManager._instance){
> GCManager._instance = new GCManager(new SingeltonEnforcer());
> }
> return GCManager._instance;
> }
>
> }
>
> class SingeltonEnforcer {
> public function SingeltonEnforcer():void {
> return;
> }
> }
>
>
> If I am in a Module (call it Module A), and I set the variable currentId to
> any number,
then I
> switch to a differnt module (call it Module B), and I try to get the variable
> currentId, it
> returns 0. However, if I switch back to Module A, it is still the number I
> set it to, and if I
> then go back to Module B, it is still 0.
>
> This would lead me to believe it is creating duplicates, or more then 1
> instance.
>
> Any ideas? Anyone had a problem similar to this?
>