Hi,

This maybe a really dumb question, but why I can't I create new
objects or even assign a null object a value in the class itself?

It works fine if I do it in a function. Just trying to understand i'm
sure there is a good reason.

Many thanks,




public class MyClass
{

   // doesn't work here
   pageRO = new RemoteObject();
   pageService = PageService.getInstance();


public function Foo():void{
  
   // works here
   pageRO = new RemoteObject();
   pageService = PageService.getInstance();

}
}


Reply via email to