In todays flash player yes but with advent of AS3 the compiler will require it to maximize engine efficiency. I suppose you could argue that the compiler could make those judgment calls on the fly but in many cases it can't and won't which bloats the end result (memory allocation/hash tables). No?
Cheers Robert -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andreas Weber Sent: Thursday, January 12, 2006 10:42 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] TreeDataProvider - "There is no method withthename'addTreeNode'" In the light of longer compilation times and the hours wasted with issues like this... Shouldn't we consider the claim that strict-typing cuts down developement time as one of those completely unfounded urban legends? ;-) > mx.controls.treeclasses.TreeDataProvider Sounds great, but I still don't get it to work - no compiler error, but also no node added: import mx.controls.treeclasses.TreeDataProvider class Test{ function Test(){ var myTreeDP:TreeDataProvider = TreeDataProvider(new XML()); myTreeDP.addTreeNode("node", 0); trace('cast to TreeDataProvider '+myTreeDP); // avoid Compiler error when publishing for Player 7 var myTreeDP = new XML(); myTreeDP.addTreeNode("node", 0); trace('untyped '+myTreeDP); } } Output: cast to TreeDataProvider null untyped <node data="0" label="node" /> Cheers! -------------- Andreas Weber motiondraw.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Johannes Nel Sent: Thursday, January 12, 2006 3:21 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] TreeDataProvider - "There is no method with thename'addTreeNode'" mx.controls.treeclasses.TreeDataProvider you need to get a good editor :) On 1/11/06, Derek Lords <[EMAIL PROTECTED]> wrote: > > "missing intrinsic class issue" good guess. This happened to me upon > upgrading to Flash 8. I had to downgrade each instance to an Object and > the > problem went away. > > > > > > > >From: "Andreas Weber" <[EMAIL PROTECTED]> > >Reply-To: Flashcoders mailing list <flashcoders@chattyfig.figleaf.com> > >To: "Flashcoders" <flashcoders@chattyfig.figleaf.com> > >Subject: [Flashcoders] TreeDataProvider - "There is no method with the > >name'addTreeNode'" > >Date: Wed, 11 Jan 2006 16:13:26 +0100 > > > >With a Tree component on stage and this framecode > > > > var myTreeDP:XML = new XML(); > > myTreeDP.addTreeNode("node", 0); > > > >the TreeDataProvider API works fine. > > > >However, the same code in a class > > > > class Test{ > > function Test(){ > > var myTreeDP:XML = new XML(); > > myTreeDP.addTreeNode("node", 0); > > } > > } > > > >instantiated from a .fla that has a Tree component on stage, throws a > >compiler error: > > > > "There is no method with the name 'addTreeNode'" > > > >Is this a missing intrinsic class issue? Workarounds? (don't have any > luck > >with avoiding the compiler error through Array access syntax: no error, > but > >no node is added). > > > >Cheers! > > > >-------------- > >Andreas Weber > >motiondraw.com > > > > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders