Re: doesNotRecognizeSelector exception
Re: doesNotRecognizeSelector exception
- Subject: Re: doesNotRecognizeSelector exception
- From: Sherm Pendley <email@hidden>
- Date: Sat, 26 Mar 2011 22:05:31 -0400
On Sat, Mar 26, 2011 at 9:39 PM, Jeffrey Walton <email@hidden> wrote:
>
> I have a protocol and declarations as follows. respondsToSeletor
> returns NO. If I ignore respondsToSeletor (and send the message), I
> get an expeption.
>
> // FilePicker.m - try both
> BOOL responds = [delegate respondsToSelector:@selector(userSelectedFile:)];
> BOOL responds = [delegate
> respondsToSelector:@selector(userSelectedFile:fileSystemObject:suppliedContext:)];
>
> Any ideas on my error(s)? I can't seem to locate it (or them) on my own.
>
> // MyViewController.h
> @interface MyViewController : UIViewController
> <FilePickerDelegate>
> {
> ...
> }
>
> // MyViewController.m
> FilePicker* picker = [[FilePicker alloc] initWithDelegate:self withContext:0];
> [self presentModalViewController:picker animated:YES];
Okay, I see where you've declared MyViewController as implementing the
FilePickerDelegate protocol - but where are the method
implementations? You *have* implemented those methods, right?
sherm--
--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden