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
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
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
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!
--
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
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
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
7 matches
Mail list logo