[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposition for a Gorm feature Was: Gorm too complex
From: |
Lars Sonchocky-Helldorf |
Subject: |
Re: Proposition for a Gorm feature Was: Gorm too complex |
Date: |
Tue, 12 Feb 2002 13:38:24 +0100 |
>> From: "Lars Sonchocky-Helldorf"
<Lars.Sonchocky-Helldorf@bbdo-interone.de>
>> Date: Mon, 11 Feb 2002 22:09:23 +0100
>>
>> > (ever tried to get a useful diff out of .nibs ? ;-).
>>
>> maybe use nibtool to convert the nibs in something readable first?
>>
>> Greetings, Lars
>
>Well, can nibtool convert back to nib the text form? Otherwise, it
>would not be usefull to diff and merge the text form (think CVS).
>
Yes:
Welcome to Darwin!
[localhost:~] lhelldor% man nibtool
man: Formatting manual page...
NIBTOOL(1) NIBTOOL(1)
NAME
nibtool - prints, verifies, and updates nib files.
SYNOPSIS
nibtool -[achjrsvdtpwWxBILOPCV8Rf?] 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 desciptions 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
-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. Llist of out-
lets 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
Apple Computer, Inc. Oct 31 2001 1
NIBTOOL(1) NIBTOOL(1)
if nibfile requires a class in bundle. to load.
-O, --use-oids
Use unique object identifiers instead of the object
tiles in localizatioin 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 nibile 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 clases in nibfile that have pre-
fix old into new. Can be used to convert all
classes whos 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 translating, make use of information from the
previous nibfile. This option is used in
Apple Computer, Inc. Oct 31 2001 2
NIBTOOL(1) NIBTOOL(1)
conjunction with the -t option.
-t, --translation nibfile
When translating, make use of information from the
previous translation nibfile If the -p option is
used the layout information is used from the previ-
ous nibfile given in the -p option above. But
strings that could not be found in the dictionary
are obtained from nibfile given on the command line
to -t, must be used to the -p option otherwise it
is equivalent to the -L option
-I, --incremental nibfile
When translating, make use of layout information
from the previous localization nibfile. Maintain
the layout merging from previous nib file in the
newly created file.
-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
nibtool -L file.nib > file.strings
nibtool -w nFile.nib -d file.strings file.nib
nibtool -I oFile.nib -w nFile.nib -d file.strings file.nib
The First command generates an ascii representation of
file.nib. The Second generates localization dictionary
for file.nib. The Third reloads in the localization dic-
tionary and writes out a new file nFile.nib. The last
example uses the layout information in oFile.nib and the
strings file file.strings to generate nFile.nib. The last
example is used when the develoepr has added a new control
to file.nib but all of the nib files have already been
localized (ie the size of the controls has already been
adjusted), this command will make the size of the objects
Apple Computer, Inc. Oct 31 2001 3
NIBTOOL(1) NIBTOOL(1)
in nFile.nib match the sizes of the same objects in
oFile.nib.
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 Computer, Inc. Oct 31 2001 4
[localhost:~] lhelldor%
greetings, Lars