do:
else if(urlvars.bids != null){
// do this;
}
instead
- Taka
On Tue, Mar 31, 2009 at 1:01 PM, Alexander Farber
<[email protected]> wrote:
> Hello,
>
> I have the following function called repeatedly:
>
> private function handleComplete(event:Event):void {
> var urlvars:URLVariables = event.target.data;
> .........
> if (urlvars.lobby) {
> .........
> } else if (urlvars.bids) {
> populate(urlvars.bids, User.BIDS);
> } else if (urlvars.cards) {
> populate(urlvars.cards, Card.CARDS);
> }
> }
>
> and for some strange reason eventhough
> the urlvars doesn't contain the field "bids"
> (I watch the urlvars in debugger and
> advance step by step), the function
> populate(urlvars.bids, User.BIDS);
> still gets called (and then fails with
> TypeError: Error #1009: Cannot access a property or method of a null
> object reference.
> at Pref/populate() )
>
> I don't understand why it happens and
> how should I perform the check instead...
>
> Any advices please?
>
> Thank you
> Alex
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders