Re: [flexcoders] hi! this examples didn't work out,please help

2008-11-06 Thread Tom Chiverton
On Wednesday 05 Nov 2008, Gordon Smith wrote: > Declaring > > public var myFirstProperty:String; > > is equivalent to declaring > > public var myFirstProperty:String = null; Yup, but certainly for ArrayCollection, if you create it null rather than empty, it breaks. So it's a good habit to

RE: [flexcoders] hi! this examples didn't work out,please help

2008-11-05 Thread Gordon Smith
: flexcoders@yahoogroups.com Subject: Re: [flexcoders] hi! this examples didn't work out,please help On Wednesday 05 Nov 2008, ashlytu wrote: > [Bindable] > public var myFirstProperty:String; You should always give public Bindables a de

Re: [flexcoders] hi! this examples didn't work out,please help

2008-11-05 Thread Tom Chiverton
On Wednesday 05 Nov 2008, ashlytu wrote: > [Bindable] > public var myFirstProperty:String; You should always give public Bindables a default value: [Bindable] public var myFirstProperty:String=''; -- Tom

RE: [flexcoders] hi! this examples didn't work out,please help

2008-11-05 Thread Tracy Spratt
You can only do simple initialization of vars outside of a function. If you try, you can get a null object reference. (please give the text of the error, I do not have the numbers memorized) Put that variable assignment into a function, like init() and call it in a creationComplete handler.