> On 24 Jun 2015, at 18:52, Carl Hoefs <newsli...@autonomy.caltech.edu> wrote: >> >> Or better still, disable the “Refactor Menu Item” if something is selected >> that it doesn’t handle, seems pointless (and potentially dangerous) to me to >> allow the user to select something just to tell them (in a round-about >> manner) that it can’t handle what they have selected. > > The real question is why is it impossible for Xcode to refactor a #define? > -Carl
It depends on what you mean by “refactor” it could globally replace it (behind the scenes), but an #define is handled differently from (say) a property or a method name. For these types of symbol it actually looks up the symbols in the compiler data structures rather than blindly looking at the source code - which is why it doesn’t always work. For instance if you had two classes that both define a property called “fred”: @interface ClassA @property (nonatomic,retain) NSString* fred; @end @interface ClassB @property (nonatomic,retain) NSString* fred; @end If you refactor “fred” in ClassA, it doesn’t (or shouldn’t) change ClassB whereas a Global Replace would change it everywhere. Cheers Dave _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com