On Nov 21, 2009, at 9:08 PM, Shane wrote:

> Yep, thanks. The address of self within each of my methods has a
> different address value. Not sure why, but, that's something to go on.


When a method is called, 'self' refers to the object that received the 
message*. What you're seeing is that you unexpectedly have more than one 
instance of your class and they're being called in different places. If you 
want to figure out why this is happening, put a breakpoint in your 'init' 
method (or if your class doesn't have one, just add an empty one that returns 
[super init].) You'll find it's called multiple times, creating multiple 
objects, and from looking at the stack you should be able to figure out why.

—Jens

* You may know it by the name 'this', from languages like C++, Java or 
PHP._______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to