• 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: Search & replace in nib files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search & replace in nib files?


  • Subject: Re: Search & replace in nib files?
  • From: Glen Low <email@hidden>
  • Date: Sun, 14 Mar 2004 16:55:34 +0800

On 14/03/2004, at 1:19 AM, Florent Pillet wrote:

Do this from the command line with nibtool:

$ nibtool -r -C MyOldClassName GLMyNewClassName mynibfile.nib

Ah this is exactly what I wanted, however it didn't work with my nib file (10.3) and nibtool (349). Specifically it seems to have fixed the keyedobjects.nib file with the nib, but left the classes.nib untouched.

email@hidden:

You could save the NIB files in MacOS 10.3 format and as XML (there's an option in IB to do that). After that, you'd just go through the NIB files with grep or any other find/replace tool and replace any occurrences of your class names in there. Note that NIB files are file packages, which may be an issue if you want to select them for search & replace in whatever app you're using.

Yes, of the three files within a nib file, two are clean XML: info.nib and classes.nib. However the keyedobjects.nib is a binary file. I can open it in Property List Editor and save it back as XML, presumably this is a NSKeyedArchiver binary format, but this corrupts the file so that nibtool complains:

2004-03-14 16:31:02.248 nibtool[3921] IBObjectData and DocumentInfo don't have the same Target Framework (null) vs IBCocoaFramework

Perhaps I will combine both approaches and see how it goes.


Cheers, Glen Low


---
pixelglow software | simply brilliant stuff
www.pixelglow.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Search & replace in nib files? (From: Glen Low <email@hidden>)
 >Re: Search & replace in nib files? (From: Florent Pillet <email@hidden>)

  • Prev by Date: Re: Cocoa/Foundation and CoreFoundation
  • Next by Date: Re: NSTimer discarding exception 'NSInternalInconsistencyException'
  • Previous by thread: Re: Search & replace in nib files?
  • Next by thread: Re: Search & replace in nib files?
  • Index(es):
    • Date
    • Thread