Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: renaming classes



At 4:02 PM -0400 9/2/03, Scott Anguish wrote:
On Sep 2, 2003, at 3:23 PM, Chuck Soper wrote:

At 4:54 AM -0400 9/2/03, Scott Anguish wrote:
no need to do that.. in Project Builder just select the file you need to rename, and control/right click to get the contextual menu. There is a Rename there.

Thanks. I also discovered a Rename command in the Project menu. It also looks possible to rename a file using the Info panel. All of these methods yield the same result: an alert stating that I cannot rename the file with no explanation. I have made sure that the file that I'm trying to rename is closed (not busy). I think that I have to go back to my original idea of directly modifying the project.pbxproj file.


Well, this should work, I've done it many times. I'd suggest if you're using the _latest_ dev tools, that you file a bug.

I just figured it out. The Rename command works fine if characters are being added or removed in the name, but if some characters merely change their case sensitivity (i.e. appController.h to AppController.h) then the Rename command does not work. Can you reproduce that? I'm using the latest Dev Tools. Did I find a bug? I'll file a bug report. Thanks.

A work-around would be to rename the file twice (i.e. appController.h to appController1.h to AppController.h).

For completeness, here are my steps to rename a class:
1. Quit PB. Trash the build folder for the project in question.
2. In the Finder, rename the source and header files that represent each renamed class.
3. In IB, rename custom classes under the Classes tab. Scroll to the bottom of the Magnifier Glass pop-up menu to see all custom classes in the nib. Rename instances of these classes under the Instances tab.
4. In PB, use the Rename command to rename each file. If only the case sensitivity is changing then you may need to rename the file twice (i.e. appController.h to appController1.h to AppController.h). (Instead of using the Rename command in PB, you could use BBEdit to open the project.pbxproj file (within the project bundle) to find and replace the class name(s) with the correct case sensitivity.)
5. In PB, Batch Find (whole words/case sensitive) the class name(s) and replace
with the class name with upper case characters.
6. Rebuild the project.
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.
References: 
 >renaming classes (From: Chuck Soper <email@hidden>)
 >Re: renaming classes (From: Scott Anguish <email@hidden>)
 >Re: renaming classes (From: Chuck Soper <email@hidden>)
 >Re: renaming classes (From: Scott Anguish <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.