board is null

2 views
Skip to first unread message

Nicole Bieber

unread,
Apr 5, 2010, 12:46:45 PM4/5/10
to 68...@googlegroups.com
Hi-
I'm having some problems w/ the board being null when I pass it into my
CheckerboardInteractor - the board clearly isn't null (since there are
pieces on the board) - but I guess it is when I pass it in (at onLoad).
I can test to make sure it's not null, but then I can't instantiate
CheckerboardInteractor at all. Where should I be instantiating my
CheckerboardInteractor so that this isn't a problem?
Thanks,
n

Olayemi A F Oyebode

unread,
Apr 5, 2010, 12:49:10 PM4/5/10
to 68...@googlegroups.com
You should be instantiating it after you've determined that the board exists. I assume there's somewhere in your pixelCheckerboard where you check that board exists, that's where it belongs. 

2010/4/5 Nicole Bieber <nbi...@mit.edu>



--
Mr Olayemi A F Oyebode

Nicole Bieber

unread,
Apr 5, 2010, 1:06:57 PM4/5/10
to 68...@googlegroups.com
Well, that was sort of my question - where can I check that the board
exists?
-n

Olayemi A F Oyebode wrote:
> You should be instantiating it after you've determined that the board
> exists. I assume there's somewhere in your pixelCheckerboard where you
> check that board exists, that's where it belongs.
>

> 2010/4/5 Nicole Bieber <nbi...@mit.edu <mailto:nbi...@mit.edu>>

Olayemi A F Oyebode

unread,
Apr 5, 2010, 1:09:52 PM4/5/10
to 68...@googlegroups.com
Oh I see. In my case, I check if board inside the function I called on creationComplete for pixelcheckerboard. 

2010/4/5 Nicole Bieber <nbi...@mit.edu>



--
To unsubscribe, reply using "remove me" as the subject.

Maria Rodriguez

unread,
Apr 5, 2010, 7:58:20 PM4/5/10
to 68...@googlegroups.com
I think I'm having the same problem. That is, if I click new game with the stroke tab selected and then switch to the pixel view, I can't drag anything. Selecting the pixel tab first and clicking new game, however, does not have this problem. So you just change the line in Checkerboard that says creationComplete="onLoad()"> to call another function that isn't onLoad()?
--
Maria I. Rodriguez
Massachusetts Institute of Technology
Electrical Engineering & Computer Science
Class of 2011
Reply all
Reply to author
Forward
0 new messages