 |
 |
Creating Documentation about an IB .nib File
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Location: Northeastern NV, USA
Status:
Offline
|
|
Is there a 3rd party product that will produce a report of the contents of a .nib file?
What I'm looking for is something that would do the following:
- Give a list of all windows, sheets, and alerts
- Graphically print out the windows, sheets, and alerts as they appear while you work on them in IB
- Provide a listing of all outlets and actions that have been defined
- Provide a cross-reference listing showing what connections have been made to/and from outlets, actions, delegates, etc...
- Show the "canned" connections differently than the developer added ones
- Provide a listing of all classes that were created in IB and what they were subclassed from.
- Listing of referenced sounds
- And a list of other user added items (custom souncds, graphics, icons, etc...)
- Anything else pertinent to the IB Project
I'd find this to be very helpful working on larger projects and for producing documentation.
Thanks!
---> Kelsey
(Last edited by yeslekmc; Nov 22, 2002 at 03:07 PM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
Actually, there's a first-party product that does almost exactly what you asked. The program /usr/bin/nibtool is installed with the Developer Tools, and can be used to produce a text report of just about everything in a nib file -- useful for diff'ing to track changes or making production of localized nibs easier.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Location: Northeastern NV, USA
Status:
Offline
|
|
And so there is!
I just spent some time checking out this utility. It does yield most of what I want, just not exactly how I'd like to see it. I find the class listing to be the most useful for it lists out what outlets exist and what objects they are attached to.
One note though.... I just realized that my "MainMenu.nib" file is not a file at all. It is a directory containing separate specialized .nib files. Most of them are ascii text files, except for the objects.nib file. Is this file structure documented anywhere?
Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status:
Offline
|
|
Originally posted by yeslekmc:
One note though.... I just realized that my "MainMenu.nib" file is not a file at all. It is a directory containing separate specialized .nib files. Most of them are ascii text files, except for the objects.nib file. Is this file structure documented anywhere?
No. It's a binary serialized objects file (and in the 10.2 format nibs it's a keyed archiving format serialized object file). The file formats are not documented.
|
|
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Aug 2002
Location: Northeastern NV, USA
Status:
Offline
|
|
Originally posted by Angus_D:
No. It's a binary serialized objects file (and in the 10.2 format nibs it's a keyed archiving format serialized object file). The file formats are not documented.
OK... I'm currently running 10.1.5 and when I launch terminal and cd to my project's English.lproj directory and perform an ls, this is what I get:
-rw-r--r-- 1 bogus unknown - 546 Nov 16 23:02 InfoPlist.strings
drwxr-xr-x 5 bogus unknown - 264 Nov 18 18:21 MainMenu.nib
drwxr-xr-x 5 bogus unknown - 264 Nov 18 17:56 MainMenu~.nib
The MainMenu.nib "file" sure looks like any other UNIX directory to me. Even if I use the CLI to look inside the program.app directory the .nib "file" still looks like a directory intstead of a file.
In fact, I cd'd inside of MainMenu.nib and performed an "ls" there as well. An "ls" yielded the following:
-rw-r--r-- 1 bogus unknown - 442 Nov 18 18:21 classes.nib
-rw-r--r-- 1 bogus unknown - 554 Nov 18 18:21 info.nib
-rw-r--r-- 1 bogus unknown - 5700 Nov 18 18:21 objects.nib
-rw-r--r-- 1 bogus unknown - 66 Nov 24 11:22 testgarbage
Note: I added the file testgarbage that just contained a few lines of sporadic keystrokes that I pounded from the keyboard. I added this file to see how it would affect the .nib file. It appears to have no effect what-so-ever. My project still builds and runs as before, and even opening up the .nib "file" in Interface Builder reports no errors or ill consequences. I even perused through the classes and saw no problems there.
It seems like a UNIX directory to me. The finder doesn't treat it that way though, but the command line does. Now I"m a bit befuddled... When you issue UNIX commands against do they all "unarchive" the MainMenu.nib file on the fly for you? How does this work if it's not actually a directory? It looks to me like your projects main ".nib" file is a directory that contains actual ".nib" files that are archived serialized objects.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status:
Offline
|
|
It looks to me like your projects main ".nib" file is a directory that contains actual ".nib" files that are archived serialized objects.
That is correct. Nibs are actually directories that appear as "files", just like applications and RTFD documents are. These "file packages" won't be harmed if you look inside them or add things inside them -- the apps that use them only touch the files within that they're looking for. See the Inside Mac OS X: System OVerview document for more info.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|