Skip navigation.
 
mlRe: Attack of the Nils!
FROM : mw
DATE : Tue Dec 31 21:46:04 2002

On 12/30/02 5:51 PM, "Marcel Weiher" <<email_removed>> wrote:

>>  and neither method has any private variables that have the name
>> 'controller'. However, I did test your theory, and the pointer was
>> still
>> <nil> when it got to -mouseExit. Any other ideas?

>
> 1.    Make sure that 'self' is the same object in both cases, by
> printing its address.
> 2.    Don't use the debugger to check these things, use NSLog()
>


Ah hah! That was the problem! The memory address of self was different in
the two cases. Upon further inspection, I found out that, even though the
rollover button object was contained in the nib file (and therefore had
already been allocated and initialized), I was creating ANOTHER instance of
the class in my code. The first time execution was given to a method in the
class, it was in the -awakeFromNib method (in the instance of the class in
the nib file). The second time, it was its own method, so it was in the one
I created. With this knowledge, I defeated the problem :-).

Thanks for everyone's help! It seems that a lot of you were hinting towards
a dual instance of the class.

Thanks again,
mw
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlAttack of the Nils! mw Dec 30, 22:26
mlRe: Attack of the Nils! Michael Latta Dec 30, 22:52
mlRe: Attack of the Nils! mw Dec 30, 23:35
mlRe: Attack of the Nils! mw Dec 30, 23:44
mlRe: Attack of the Nils! Marcel Weiher Dec 30, 23:51
mlRe: Attack of the Nils! Michael Latta Dec 31, 00:02
mlRe: Attack of the Nils! Kevin Callahan Dec 31, 00:12
mlRe: Attack of the Nils! Ryan Stevens Dec 31, 03:29
mlRe: Attack of the Nils! mw Dec 31, 21:46