views:

120

answers:

2

I am new to Mac OS X programming and so I am going through an introductory text that includes building interfaces using Interface Builder (3.2.3) for both Cocoa and Carbon. Unfortunately I am having problems getting some of the examples I type in to run error free in the Cocoa and Carbon simulators. So I tried downloading the source code files from the publisher's website and found that they ran with no problems.

I'm trying to find the differences between the publisher's working and my non-working versions of the code. I started by just trying to compare the attribute settings as listed in Inspector but I could not find any differences. I then came across File Merge which I used to compare the .nib files for the two different versions. File Merge does show the differences but since I am unfamiliar with the markup language used in the .nib file and it lists too many differences to track down without being knowledgeable enough to know what is relevant or not, it really hasn't been very helpful.

My question is whether or not there is a tool or method available that will better show me the differences in the two versions of the code than what I can see in the Inspector window but also shows it in a more condensed and user friendly form than what is provided by File Merge. What is the recommended tool/methodology to debugging code in Interface Builder?

Also, can anyone recommend documentation where I can become familiar with reading and debugging the code in the .nib file in case that is the only way to find the differences?

Thanks

+1  A: 

Check out nib2objc

Convert both yours and the example nibs to code. It will convert nib files to what looks more like Obj-C code. Then just diff sections of them and see what's different. Should be pretty easy to read code vs NIB files.

psychotik
“For the moment this utility only works for UIKit views …”
Peter Hosey
If he's building a sample from a book, I'm willing to wager it's UIKit based. ;)
psychotik
@psychotik: He mentions Mac OS X and Carbon, so no, I don't think it's UIKit based.
JWWalker
Please see the update to my original question.
Mike
A: 

The command line program ibtool can convert a nib into a text format, but I don't know if that will be sufficiently readable.

JWWalker
Please see the update to my original question.
Mike