This was my perfect excuse to extensively use the Debugger .. so here are the results:
I am using touchesBegan
to start the creation of a newGame()
where I knew the nil value happened …
- set breakpoint within
newGame()
with no error yet - stepped through each statement and progressed to the very end of
touchesEnded(..)
with still no error. - then I stepped into and the error happened.
In summary, why didn’t the error happen when I was stepping thru newGame()
, but waited until the end of `touchesEnded(..)??
Okay .. maybe I am wrong and the nil object is not occurring within newGame()
.
So, what is happening after touchesEnded(..)
finishes ??