Re: Category or Protocol? (sidetrack)
Re: Category or Protocol? (sidetrack)
- Subject: Re: Category or Protocol? (sidetrack)
- From: Dirk van Oosterbosch <email@hidden>
- Date: Thu, 21 Apr 2005 10:32:33 +0200
Hi,
On 21-apr-05, at 01:41, John Stiles wrote:
I don't have a ton of experience with intelligent code editing tools,
I even have less.
And I am new to Obj-C or C, so sorry if this is a dumb remark and even
more sidetracking ... but
For example, theoretically if you had two classes with a Foo()
method, you could add a parameter to Foo() in class A and not class B,
and the editor could find all the instances of the Foo() method in
class A and not class B. This isn't possible with grep :)
How intelligent do you want your editor to be?
Since Obj-C can be weakly typed ...
If you have:
id someObject;
// does something to set that to be an instance of some class you or
the editor don't know.
[someObject foo];
Then if you change your -foo method in ClassA to be
-fooWithFlag:(BOOL)yesOrNo, do you expect your editor to change this
above code to:
id someObject;
// does something to set that to be an instance of some class you or
the editor don't know.
if ([someObject isKindOfClass: [ClassA class]]) {
[someObject fooWithFlag:YES];
} else {
[someObject foo];
}
just wondering ...
Best,
dirk
-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands
T ++ 31 20 7765565
M ++ 31 6 48401910
W http://labs.ixopusada.com
-----------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden