On Sat, Mar 7, 2009 at 12:18 AM, Aaron Wallis <d2k...@gmail.com> wrote: > The property was assigned as: > @property (retain) id delegate; > > when I walk through the code (and log pretty much everything out) > I get the following: > > - (void)processString:(NSString *)tString withDelegate:(id)tDelegate { > NSLog(@"1. %@", tDelegate); // I get <TMPSTProcessDropOperation: > 0x175930> > > self.delegate = tDelegate; > > NSLog(@"2. %@", self.delegate); // I get <NSAutoreleasePool: 0x187e10> > > [self.delegate doSomething]; // I get -[NSAutoreleasePool > doSomething]: unrecognized selector sent to instance 0x187e10
I'm going to guess that maybe "self" is pointing to a deallocated instance. Turn on NSZombie checking and see what happens: <http://www.cocoadev.com/index.pl?NSZombieEnabled> Another couple things. The delegate pattern says you don't retain the delegate, to avoid retain cycles (loops). Also, it's a little unusual to pass the delegate around to various methods. Usually there's one setDelegate: call (or an Obj-C 2.0 property) and all subsequent methods use that delegate. _______________________________________________ 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