• 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: from symbol name to full documentation in Xcode 4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: from symbol name to full documentation in Xcode 4


  • Subject: Re: from symbol name to full documentation in Xcode 4
  • From: Jean-Denis Muys <email@hidden>
  • Date: Tue, 22 Mar 2011 09:37:52 +0000
  • Thread-topic: from symbol name to full documentation in Xcode 4

On 22 mars 2011, at 10:15, Ulf Dunkel wrote:

> Can we conclude the whole stuff like this for the moment?
>
> Xcode 3
> -------
> [cmd]-click: nothing
> [opt]-click: nothing
>

Well, no. Not "nothing".

cmd-click is for making a discontiguous text selection.
opt-click is for making a rectangular text selection.

Both of which are very useful.

Both of which are broken in Xcode 4.

What a PITA.

small PITA: rdar://8994255

Discontiguous text selection (command click and drag):
You cannot use double-click (word selection) or triple-click (line selection) with the command key down to add a word (line) to the current selection. When you command-double|triple-click, the previous selection is lost.

big PITA: rdar://8994243

Summary:

When writing code, I use regularly this feature of Mac OS X text: non linear text selection. I find Non-linear text selection very useful when programming in Objective-C. Non-linear text selection happens when you hold the option-key. The mouse cursor then becomes a cross hair, and you can draw a marquee around a rectangular area. All text within that area is selected. You can copy then paste that text. It turns out that pasting that text doesn't work correctly in Xcode 4.

Steps to Reproduce:

start with the following code sample (a bit artificial, this is to illustrate):

@property (nonatomic, retain) IBOutlet UISlider *outer_satur_slider;
@property (nonatomic, retain) IBOutlet UISlider *outer_alpha_slider;
@property (nonatomic, retain) IBOutlet UISlider *mid_satur_slider;
@property (nonatomic, retain) IBOutlet UISlider *mid_alpha_slider;
@property (nonatomic, retain) IBOutlet UISlider *inner_satur_slider;
@property (nonatomic, retain) IBOutlet UISlider *inner_alpha_slider;

@synthesize
@synthesize
@synthesize
@synthesize
@synthesize
@synthesize

(there is a space after each of these "@synthesize ")

The goal is to copy/paste the correct property names to the series of @synthesize statements. I Xcode 3, I can do it in three steps:

1- copy the property names only from the @property statements by option-click and dragging a rectangle only their names only.

This will select this:

outer_satur_slider;
outer_alpha_slider;
mid_satur_slider;
mid_alpha_slider;
inner_satur_slider;
inner_alpha_slider;

2- click to place the caret at the end of the *first* @synthesize line.

3- paste.

Expected Results:

@synthesize outer_satur_slider;
@synthesize outer_alpha_slider;
@synthesize mid_satur_slider;
@synthesize mid_alpha_slider;
@synthesize inner_satur_slider;
@synthesize inner_alpha_slider;

(as it works in code 3).

Actual Results:

@synthesize *outer_satur_slider;
*outer_alpha_slider;
*mid_satur_slider;
*mid_alpha_slider;
*inner_satur_slider;
*inner_alpha_slider;
@synthesize
@synthesize
@synthesize
@synthesize
@synthesize

Notes:
It can be argued which is the correct behavior: Xcode 3's or Xcode 4's. I argue that Xcode 3's behavior is the most correct, if a bit counter intuitive at first. Here is why:

• it allows for a very useful use case, one example of which I gave above. I use this all the time.

• there is no easy way to replicate this useful use case with Xcode 4. The best you can do with Xcode 4 in my example above is to paste first the property names, then to copy "@synthesize " and click and paste it *six times* (as many times as you have lines). A very dire loss in productivity. The need for clicking to the beginning of each line is a killer here. (of command-left arrow followed by down arrow, which isn't any better).

• while Xcode 4's behavior is indeed useful in its own right, it's much easier replicated in Xcode 3: you only need to insert enough blank lines before you paste, Which is very easily done by holding down the return key. I don't hesitate to insert more blank lines than I need, because it's so very simple to delete the excess ones afterwards.


Jean-Denis Muys


 _______________________________________________
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: from symbol name to full documentation in Xcode 4
      • From: "B.J. Buchalter" <email@hidden>
References: 
 >from symbol name to full documentation in Xcode 4 (From: Matt Neuburg <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Christiaan Hofman <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Matt Neuburg <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Christiaan Hofman <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Matt Neuburg <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Christiaan Hofman <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Jean-Daniel Dupas <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Christiaan Hofman <email@hidden>)
 >Re: from symbol name to full documentation in Xcode 4 (From: Ulf Dunkel <email@hidden>)

  • Prev by Date: Re: Why does XCode 4 always open files up to maximum size?
  • Next by Date: Re: from symbol name to full documentation in Xcode 4
  • Previous by thread: Re: from symbol name to full documentation in Xcode 4
  • Next by thread: Re: from symbol name to full documentation in Xcode 4
  • Index(es):
    • Date
    • Thread