On 5/4/07, residentevil_64 <[EMAIL PROTECTED]> wrote:
> Hi, I am having the following class:
>
> public class Controller
> {
>
> private static var singleInstance:Controller;
>
> public static function getInstance():Controller
> {
> if(singleInstance == null)singleInstance = new Controller();
> return singleInstance;
> }
> public static function _trace(str:Object):void
> {
> singleInstance.texttrace.text += "\n" + str
> }
> }
> When I try to call Controller trace method, the following errors are
> returned:
>
> TypeError: Error #1009: Cannot access a property or method of a null
> object reference.
> at Controller$/_trace()
Where are you calling getInstance() ?