[mtasc] Instance undefined

Pedro Pla pedropla at holidaymarketing.com
Wed Jun 7 17:07:18 CEST 2006


Hi Chris,

Any chance that the variable application_model isn't being properly set in the 
class initializer? Maybe try making it a local variable to test if that is 
the case by putting a "var" in front of it...

Not sure if that will help.. might give you a better idea where the problem is 
though...

Pedro

On Wednesday 07 June 2006 22:12, Chris Sessions wrote:
> Hi all,
>
> I'm running into a strange problem where a class instance is not
> getting set when I compile w/ MTASC, but it's working fine in the
> Flash IDE. Here's a bit of code and some traces:
>
> private function launch():Void {
>    application_model = new ApplicationModel()
>    myTrace('application_model', application_model)
>    myTrace('application_model.path', application_model.path)
>
> Compiled in Flash IDE:
>
> Model instantiated				<- trace in ApplicationModel's superclass
> ApplicationModel instantiated		<- trace in ApplicationModel class
> application_model : [object Object]
> application_model.path : ../../
>
> Compiled in MTASC:
>
> Model instantiated
> ApplicationModel instantiated
> application_model : undefined
> application_model.path : undefined
>
> I'm not getting any warnings or errors in MTASC during compilation. I
> believe that working fine a couple days ago, although my brain kinda
> melted yesterday trying to figure this out so I'm not positive. Any
> ideas?
>
> Thanks,
>
> Chris Sessions
> csessions at gmail.com



More information about the mtasc mailing list