Re: changeKeyPath method documentation
Re: changeKeyPath method documentation
- Subject: Re: changeKeyPath method documentation
- From: Quincey Morris <email@hidden>
- Date: Sat, 10 Jan 2009 20:54:12 -0800
On Jan 10, 2009, at 10:06, Russell Martin wrote:
So, are you saying that changeKeyPath isn't an override or a
delegate method? If so, then why don't I have to put a stub in
the .h file? I thought that unless I was implementing an override or
delegate method that the stub in the .h was required. Is my thinking
wrong on this? And, if so, when is the stub in the .h file required
and not required?
I think maybe you have two different things tangled up.
1. Your 'changeKeyPath' method isn't part of the Cocoa frameworks.
That's why looking for it in the Cocoa documentation produces no
results. It's something that Hillegass designed and wrote, so
presumably its source code is given to you to use or copy.
2. Methods are just like everything else in C -- they must be *either*
declared *or* defined before they can be referenced (or both).
Declarations (what you're calling "stubs") are typically placed in .h
files, but not always. (Sometimes they're earlier in the .m file where
they're used.)
If your file compiles without errors, then if you right-click
'changeKeyPath' and choose "Jump to Definition", you should get a
popup menu with at least two entries. One will take you to the place
where the method is declared (in some .h file, probably) and the other
will take you to the place where the method is defined (in some .m
file).
If you're getting a compile error for 'changeKeyPath', then presumably
you missed a step somewhere in Hillegass's instructions for setting up
your project (e.g. you missed a #import at the top of the .m file).
_______________________________________________
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