• 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: Xcode 4, llvm and jump to definition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 4, llvm and jump to definition


  • Subject: Re: Xcode 4, llvm and jump to definition
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 12 Oct 2011 11:01:56 -0700


On Oct 12, 2011, at 1:08 AM, Thomas Clement wrote:

If you ask to jump to definition on the "setDelegate:" method it would jump you to the definition of -[NSCache setDelegate:].
Well actually it does not, instead it displays a menu filled with all the setDelegate: methods gathered from all the frameworks and project.

This works correctly for me (it jumps to the statically-resolved -setDelegate implementation.)
What version of Xcode are you on? Maybe this was improved in 4.2. (Is 4.2 public yet now that iOS 5 is out?)


On Oct 12, 2011, at 2:18 AM, Quincey Morris wrote:

I'm not sure why you think this is a result of deficient *indexing* rather than a design decision. Jump to Definition takes you to the definition of the *selector*, not to the definition of the method being called. So, if there are multiple methods declared with that selector, you get to choose.

I disagree. While technically Obj-C is a late-binding language and it’s possible for any -setDelegate implementation to be invoked at runtime, static typing limits this (unless you try to trick it with casts) so there really is a limited number of methods that are going to be invoked (most often one.) The programmer definitely wants Xcode to “do what I mean” and find the most relevant implementation(s). And as I said above, Xcode is pretty good nowadays at doing exactly that.

—Jens
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Xcode 4, llvm and jump to definition
      • From: Bayes Scott F <email@hidden>
    • Re: Xcode 4, llvm and jump to definition
      • From: Thomas Clement <email@hidden>
References: 
 >Xcode 4, llvm and jump to definition (From: Thomas Clement <email@hidden>)

  • Prev by Date: Re: CoreRecipes in Xcode4 ?
  • Next by Date: Re: Xcode 4, llvm and jump to definition
  • Previous by thread: Re: Xcode 4, llvm and jump to definition
  • Next by thread: Re: Xcode 4, llvm and jump to definition
  • Index(es):
    • Date
    • Thread