RE: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-25 Thread Gordon Smith
lly called selectPlayer(). - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, April 23, 2007 11:26 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Testing if a datatyped variable is not set yet

Re: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-24 Thread khair
This was the error I got 1195: Attempted access of inaccessible method selectPlayer through a reference with static type khGame:Player. --Keith H-- > You didn't say what error you're getting when you compare with null > (?) > On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have

RE: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-24 Thread Gordon Smith
lf Of Manish Jethani Sent: Monday, April 23, 2007 10:22 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Testing if a datatyped variable is not set yet You didn't say what error you're getting when you compare with null (?) On 4/23/07, [EMAIL PROTECTED] <mailto:khair%40n

Re: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-23 Thread khair
YEAH!!! That was what it needed. Now its fixed. (Lazy?) Boolean test of "Player.LAST_SELECTED" [CODE] if(Player.LAST_SELECTED && Player.LAST_SELECTED != this){ Player.LAST_SELECTED.deselect(); } Player.LAST_SELECTED = this; [/CODE] Thanks a many times! --

Re: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-23 Thread Michael Schmalle
Read the post wrong, disregard. :) didn't realize that was a class. why can't you write; if (Player.LAST_SELECTED) { // reset last player // set new last player } Mike On 4/23/07, Michael Schmalle <[EMAIL PROTECTED]> wrote: Hi, another lazy way; function selectPlayer() { if(Player

Re: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-23 Thread Michael Schmalle
Hi, another lazy way; function selectPlayer() { if(Player && Player.LAST_SELECTED == null){ Player.LAST_SELECTED = this; } } Peace, Mike On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I have a class, "Player" that with a "selectPlayer" method. I want "selectPlayer" to

Re: [flexcoders] Testing if a datatyped variable is not set yet

2007-04-23 Thread Manish Jethani
You didn't say what error you're getting when you compare with null (?) On 4/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a class, "Player" that with a "selectPlayer" method. > I want "selectPlayer" to automatically deselect the last selected Player > that stored in > the static va