ftp.nice.ch/pub/next/tools/gtools/GTools.API.tar.gz#/GTools.API/Documentation/Libraries/GKappkit/GKLocalizer-2.rtf

This is GKLocalizer-2.rtf in view mode; [Download] [Up]

Release 1.0  Copyright ©1994 by BITart, Regensburg.  All Rights Reserved.  Author: Gerd Knops.




GKLocalizedStringTable






Inherits From:	NXStringTable

Declared In:	GKLocalizer.h





Class Description

GKLocalizedStringTable a subclass of NXStringTable. It knows its filename and the module it was loaded from. It keeps track of unknown keys, and writes them to a file /tmp/newStrings/<name>/<name>.generated.strings when the application terminates, and was started with 'localize' as argument. There will be only one table named <name>, to insure this, you never allocate an instance directly; instead you use the class method tableNamed:{
i1 owner}:. 

Class variables  





Instance Variables

char *{
b1 name}; 
id {
b1 owner}; 
id {
b1 newStrings}; 

pardtx6140tx9660tx10180fs16fi-4040li6140fc0cf0 
name	The name of the stringtable 

owner	The owner of the stringtable 

newStrings	A NXStringTable instance, that keeps track of newly added keys. 




Method Types

fs16 
Class methods 	+ initialize
	+ appWillTerminate:
	+ tableNamed:owner:

Factory methods 	- initWithName:owner:

Implementation methods 	- name
	- valueFor:
	- valueIfKey:
	- addKey:

Archiving related methods 	- read
	- write

pardtx9660tx10180fi-520li6640fc0cf0 


li1360fc0cf0 
Class Methods

initialize
+ initialize 

If the application was started with 'localize as an argument, this method adds the class to the GKAppDelegate, in order to get notified, when the application terminates. 

fi-380li2480fc0cf0 


appWillTerminate:
+ appWillTerminate:theApp

If this method gets called, it calles the write: method of all instances. 

fi-380li2480fc0cf0 


tableNamed:owner:
+ tableNamed:(const char *)theName owner:theOwner

This method looks, wether an instance named {
i1 theName} already exists. If so, this instance is returned. Otherwise the instance is created, and initialized from <language>.lproj/<name>.strings inside the owners bundle directory. Returns the found or newly created instance. 

fi-380li2480fc0cf0 



li1360fc0cf0 
Instance Methods

initWithName:owner:
- initWithName:(const char *)theName owner:theOwner

The designated initializer. You never invoke this method directly; instead use the class method tableNamed:{
i1 owner}: 

bfs28 See also:   tableNamed:owner: 

fi-380li2480fc0cf0 


name
- (const char *)name 

Returns the {
i1 name} of this table. 

fi-380li2480fc0cf0 


valueFor:
- (const char *)valueFor:(const char *)key

This method returns a value found for {
i1 key}. If there is no Key {
i1 key} in the table, the {
b1 addKey:} method is called, and {
i1 key} is returned. 

fi-380li2480fc0cf0 


valueIfKey:
- (const char *)valueIfKey:(const char *)key

If a value for {
i1 {
i1 key}} can be found, that value is returned; otherwise an empty string will be returned. 

fi-380li2480fc0cf0 


addKey:
- addKey:(const char *)theKey

This method stores {
i1 theKey} in the NXStringTable instance {
i1 newStrings}. Returns {
b1 self}; 

fi-380li2480fc0cf0 


read
- read 

This method searches a localized file named <name>.strings inside the owners bundle, and reads the key/value pairs from that file. returns {
b1 self}; 

fi-380li2480fc0cf0 


write
- write 

If during runtime unknown keys were referenced, they were stored in {
i1 newStrings}; this table is written out to the file '/tmp/newStrings/<name>/<name>.generated.strings'. Returns {
b1 self}; 

fi-380li2480fc0cf0 




Generated by DocMaker on Wed May  4 00:51:03 1994
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.