----- Original Message ----- From: "john fisher" <[EMAIL PROTECTED]> To: <flexcoders@yahoogroups.com> Sent: Tuesday, November 11, 2008 1:39 AM Subject: [flexcoders] udefined property error without function
> context: an mxml app, with classes written by me ( Zdemos) and Flare > classes. "myCanvas" is the id of a canvas in the flex part of the file > and it works. > .... I don't understand--- > > this compiles: > > public var myDemoClass:Zdemos ; > public var myDataFilePath:String = "http://.....realdata2.xml" ; > private function init(): void { > > myDemoClass = new Zdemos(myCanvas,myDataFilePath); > myCanvas.addChild(myDemoClass.getUIComponent()); > } > > this doesn't: > > public var myDemoClass:Zdemos ; > public var myDataFilePath:String = "http://.....realdata2.xml" ; > > myDemoClass = new Zdemos(myCanvas,myDataFilePath); > myCanvas.addChild(myDemoClass.getUIComponent()); > > Errors: "access to undefined property" myCanvas/myDemoClass/myDataFilepath You'll notice that in the error there's a mention of "myDataFilepath" not "myDataFilePath" in the error, so somewhere you've got the wrong variable name.. Paul > > thanks for help > John > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > >