• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Category or Protocol? (sidetrack)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Category or Protocol? (sidetrack)
      • From: Rick Kitts <email@hidden>
References: 
 >RE: Category or Protocol? (sidetrack) (From: Jeff Laing <email@hidden>)
 >Re: Category or Protocol? (sidetrack) (From: Rick Kitts <email@hidden>)
 >Re: Category or Protocol? (sidetrack) (From: Ondra Cada <email@hidden>)
 >Re: Category or Protocol? (sidetrack) (From: John Stiles <email@hidden>)

  • Prev by Date: Cocoa/PB/IB weirdness
  • Next by Date: Call a menu with full screen
  • Previous by thread: Re: Category or Protocol? (sidetrack)
  • Next by thread: Re: Category or Protocol? (sidetrack)
  • Index(es):
    • Date
    • Thread