On Nov 20, 2009, at 12:22 PM, Jens Alfke wrote:
>
> On Nov 20, 2009, at 12:09 PM, Michael de Haan wrote:
>
>> Does the, in your opinion, "optional" addition pretty much replace
>> categories as a whole, or is there still a role for them?
>
> It replaces informal protocols. There are many othe
On Nov 20, 2009, at 12:19 PM, David Duncan wrote:
> On Nov 20, 2009, at 12:09 PM, Michael de Haan wrote:
>
>> Did not see that it was deprecated, but will take your lead and convert them
>> to that. Does the, in your opinion, "optional" addition pretty much replace
>> categories as a whole, or
On Nov 20, 2009, at 12:09 PM, Michael de Haan wrote:
> Does the, in your opinion, "optional" addition pretty much replace categories
> as a whole, or is there still a role for them?
It replaces informal protocols. There are many other uses for categories, like
* Breaking a class implementation
Le 20 nov. 2009 à 21:09, Michael de Haan a écrit :
>>
>>
>> The usual way is to NOT implements the NSObject category and test if the
>> delegate implements the method using -respondsToSelector:
>> But this way works too if you don't want to have to test before sending your
>> message.
>>
>>
On Nov 20, 2009, at 12:09 PM, Michael de Haan wrote:
> Did not see that it was deprecated, but will take your lead and convert them
> to that. Does the, in your opinion, "optional" addition pretty much replace
> categories as a whole, or is there still a role for them?
The addition of @optiona
>
>
> The usual way is to NOT implements the NSObject category and test if the
> delegate implements the method using -respondsToSelector:
> But this way works too if you don't want to have to test before sending your
> message.
>
> Anyway, informal protocols are "deprecated" in favor of @prot
Le 20 nov. 2009 à 20:46, Michael de Haan a écrit :
> I am working through an example in Buck/Yacktman's book that uses an
> informal protocol.
>
> In the interface of of a custom class, it is declared as such.
>
>
> #import
>
>
> @interface MyShapeEditorDocument : NSDocument
> {
>...
I am working through an example in Buck/Yacktman's book that uses an informal
protocol.
In the interface of of a custom class, it is declared as such.
#import
@interface MyShapeEditorDocument : NSDocument
{
ivars
}
@end
@interface NSObject(MYShapeEditingDocEditor)
-(void)