NIBTOOL(1) Computer, NIBTOOL(1)
NAME
nibtool - prints, verifies, and updates nib files.
SYNOPSIS
nibtool -[acFhjrsvdpwWxBILOPCV8Rlf?] nibfile
DESCRIPTION
nibtool lets you print, update, and verify the contents of
a nib file from the command line.
You can use nibtool to produce text descriptions for two
different versions of the same nib file and then compare
them with diff.
The output of nibtool is produced in standard plist for-
mat.
The default output encoding of nibtool is UTF-16. The
output/input format is controlled with the --utf8 or
--macosroman flags.
OPTIONS
-F, --format TYPE
Saves the nib file in one of 3 formats: 1 Pre-10.2
format (typedstreams; can be used on all versions;
can't take advantage of new features). 2 10.2 and
later format (keyed archiving; can be used on new
versions). 3 Both formats (incorporates both
files). (Does not apply to Carbon Nib files). If
-F if not specified the format of the nib file is
not changed.
-c, --classes
Prints the local classes created in nibfile and a
list of outlets and actions of the classes. (Does
not apply to Carbon Nib files)
-h, --hierarchy
Prints the object hierarchy in nibfile This is
equivalent to the outline view in Interface
Builder.
-j, --objects
Prints the settings of all of the objects in nib-
file.
-x, --connections
Prints the connections in nibfile. List of outlets
and actions for all of the objects in the nib file.
(Does not apply to Carbon Nib files)
-a, --all
Prints the classes, object hierarchy, object val-
ues, and connections in the nibfile It's equivalent
to -chjx.
-L, --localizable-strings
Prints the localizable strings in nibfile in plist
format.
-B, --bundle bundle
Loads bundle before loading nibfile This is useful
if nibfile requires a class in bundle. to load.
-O, --use-oids
Use unique object identifiers instead of the object
tiles in localization dictionary. If the object has
more than one localization string possible, then
the key will look like oid.# where # is an integer.
If the input dictionary was created with this
option, then the input dictionary will only work if
it is read in with this option.
-P, --palette palette
Loads palette before loading nibfile This is useful
if nibfile contains a class defined in palette.
nibtool will by default load in all palettes that
the user has selected to load into Interface
Builder.
-C, --convert old new
Convert all custom classes in nibfile that have
prefix old into new. Can be used to convert all
classes whose name begins with com.apple.yellow to
now be prefixed by com.apple.cocoa or all classes
that have the prefix XY to now have the prefix XZ.
-w, --write new-nibfile
Updates nibfile to the latest nib version and write
it out to new-nibfile
-W, --Write new-nibfile
Updates nibfile to the latest nib version and write
it out to new-nibfile (Overwrite new-nibfile even
if it already exits)
-r, --resave
Perform all the operations specified on the command
line on nibfile and save it back over writing the
original file. This option can be used to "update"
the objects to the newest version in the AppKit.
-s, --silent
Silent mode. Only verifies the nibfile and prints
only errors.
-v, --verbose
Verbose mode a full report is printed.
-d, --dictionary strings
Upon loading, translate strings using the strings-
file strings as dictionary.
-p, --previous nibfile
When performing incremental localization, make use
of information from the previous non-localized nib-
file.
-I, --incremental nibfile
Make use of layout information from a previous
localized nibfile. If the previous non-localized
nibfile, oSource.nib , is also provided using the
-p option, localized attributes for a given element
in nibfile are only applied if that element's
attribute was not changed between oSource.nib and
the new source nib file. If no previous nibfile is
specified, all localization changes in nibfile are
applied to the new nibfile.
-l, --localizable-attributes argument
Specify which attributes should be copied to the
nib file argument is specified in plist format
"(value1,value2,value3)" default value is "(date-
Format, stringFrame, cellSizeString, contentRect-
String, titleWidth, minSizeString, maxSizeString,
width, maxWidth, minWidth, title, stringValue,
alternateTitle, controlTitle, radioTitles, label,
helpTagText)"
-8, --utf8
set the encoding of the output/input to UTF-8
default is Unicode (UTF-16). The default encoding
expected for the input is UTF-16.
-R, --macosroman
set the encoding of the output/input to MacOSRoman.
(twobyte characters are escaped.)
-f, --fontcheck nibfile
set the font of the objects in the current nib file
to the same fonts as used in nibfile
-V, --version
Print out the Build Version of the program.
-?, --help
Print out the usage message.
EXAMPLES
nibtool -a file.nib
Dump ascii representation of file.nib.
nibtool -L file.nib > file.strings
Generates translation dictionary file.strings for
file.nib.
nibtool -w nFile.nib -d file.strings file.nib
Reloads in the translation dictionary file.strings
and writes out a new file nFile.nib with translated
strings.
nibtool -I oFile.nib -w nFile.nib -d file.strings file.nib
Uses the layout information in oFile.nib and the
translated strings file file.strings to generate
nFile.nib. This is used when the developer has
added a new control to file.nib but all of the nib
files have already been localized (i.e. the size of
the controls has already been adjusted). This com-
mand will make the size of the objects in nFile.nib
match the sizes of the same objects in oFile.nib.
This is an agressive use of the -incremental local-
ization option, and requires reviewing the new nib-
file to ensure developer's changes were not written
over.
nibtool -I oLocalized.nib -p oSource.nib -w nLocalized.nib
-d file.strings file.nib
Copy localized attributes from oLocalized.nib into
nLocaized.nib if that attribute is the same in
oSource.nib and file.nib. Any strings will be
translated using the translation dictionary
file.strings. This is a conservative incremental
localization approach, and requires review of the
nLocalized.nib file to localize any new elements.
SEE ALSO
diff(1)
BUGS
You cannot regenerate a nib file using the output of
nibtool.
Since nibtool requires the window server to be running so
it can get font information, you cannot use nibtool when
logged in to another machine over telnet or logged in
under console mode.
Apple Sep 9 2002 NIBTOOL(1)