Version 1.0 Copyright ©1993, 1994 by Mike Ferris. All Rights Reserved.
Mike Ferris - February 16th, 1994
MiscNibController |
Inherits From: | Object | |
Declared In: | misckit/MiscNibController.h |
Class Description |
Instance Variables |
id | window; | |
MiscString | *frameName; | |
BOOL | nibIsLoaded; | |
window | ![]() | |
frameName | ![]() | |
nibIsLoaded | ![]() |
Method Types |
Initializing the class | + initialize![]() |
+ startUnloading![]() |
Class nib file | + setClassNib:![]() |
+ classNib![]() |
Initializing instances | - init![]() |
- initWithFrameName:![]() - free ![]() |
The frame name | - setFrameName:![]() |
- frameName![]() |
Loading the nib | - loadNib![]() |
- loadNib:![]() - loadNib:fromBundle: ![]() - loadNibIfNeeded ![]() - loadNib:withOwner: ![]() - loadNib:withOwner:fromBundle: ![]() - nibDidLoad ![]() - nibWillLoad ![]() |
Dealing with the window | - window![]() |
- window:![]() - showWindow: ![]() |
Archiving | - awake![]() |
- read:![]() - write: ![]() |
Class Methods |
initialize |
+ initialize |
+ (const char *)classNib |
Returns the nib file name for the calling subclass. This is done by looking up the value in the MiscClassVariable
object used to store the nib names.
|
+ setClassNib:(const char *)nibName |
Sets the nib file name for the calling subclass. Nib names are stored in a MiscClassVariable, so each subclass (and
all their subclasses, etc...) get different values.
|
+ startUnloading |
Frees the nib name class variable. |
Instance Methods |
awake |
- awake |
Initializes the instance variables that are not archived after an instance has been read from a typed stream. Basically
this just makes sure the instance looks like it hasn't had its nib loaded.
See also: - read:, - write:
|
- (const char *)frameName |
Returns the frame name used to save the window's frame information in the defaults database. Returns NULL if the
frame information is not stored in the defaults database.
See also: - setFrameName:
|
- free |
- init |
Calls -initWithFrameName:![]() See also: - initWithFrameName:
|
- initWithFrameName:(const char *)name |
This is the designated initializer for the class. This allocates and initializes the frameName MiscString and initializes
the other instance variables. The nib file is not loaded until it is needed (that is, until -showWindow: or -window:YES
are called).
See also: - init, - free
|
- loadNib |
Cover method which calls [self loadNib:NULL withOwner:nil fromBundle:nil].
See also: + setClassNib:, - nibDidLoad and - nibWillLoad
|
- loadNib:(const char *)name |
Cover method which calls [self loadNib:name withOwner:nil fromBundle:nil].
See also: + setClassNib:, - nibDidLoad and - nibWillLoad
|
- loadNib:(const char *)name fromBundle:bundle |
Cover method which calls [self loadNib:name withOwner:nil fromBundle:bundle].
See also: + setClassNib:, - nibDidLoad and - nibWillLoad
|
- loadNibIfNeeded |
Loads the controller's nib file, if it has not already been loaded. If the nib file appears to exist, then -nibWillLoad is
called; if you need to do any prepatory initialization, that method should be overridden to do it. If the nib file actually
was loaded successfully, the window's frame is set if the frameName of this instance is non-NULL and the name is
registered as the window's autosave frame name. Finally, if the nib was actually loaded, the -nibDidLoad method is
called. The method -nibDidLoad should be overridden instead of -loadNibIfNeeded if you have further
initialization to do after the nib file loads. By default, the name of the nib file that is loaded is the name of the class
with ".nib" appended. For example, "MiscNibController.nib" would be the nib file loaded by this class. Use
+setClassNib: to change the name of the .nib that will be loaded.
See also: + setClassNib:, - nibDidLoad and - nibWillLoad
|
- loadNib:(const char *)name withOwner:owner |
Cover method which calls [self loadNib:name withOwner:owner fromBundle:nil].
See also: + setClassNib:, - nibDidLoad and - nibWillLoad
|
- loadNib:(const char *)name withOwner:owner fromBundle:bundle |
Loads a nib file named "name.nib" from inside the NXBundle bundle with owner as the file's owner . If name is
NULL then the instance's name (for a named object) is used; if that name is NULL, then the name of the class is
used. If owner is nil, then self is used. If bundle is nil, then the receiver's class bundle is used. This method is used
by -loadNibIfNeeded to actually load the nib file. This method does not call the -nibDidLoad or -nibWillLoad
methods. Normally this method wouldn't be used directly; -loadNibIfNeeded would be used instead.
See also: - loadNibIfNeeded
|
- nibDidLoad |
This is called by -loadNibIfNeeded after the nib file is loaded and is intended to be overridden. Although the current
implementation in the MiscNibController class does nothing, be sure to call super's implementation first if you
override this method.
See also: - loadNib... methods and - nibWillLoad
|
- nibDidLoad |
This is called by -loadNibIfNeeded before the nib file is loaded and is intended to be overridden. Although the
current implementation in the MiscNibController class does nothing, be sure to call super's implementation first if you
override this method.
See also: - loadNib... methods and - nibDidLoad
|
- read:(NXTypedStream *)stream |
Reads the instance from the typed stream. Only the frame name is archived.
See also: - awake, - write:
|
- setFrameName:(const char *)name |
Sets the window's frame name. This will only work if the nib file hasn't been loaded yet. Normally, the frame name
is set with the -initFrameName: method.
See also: - frameName
|
- showWindow:sender |
If the nib file is not loaded, this method loads it. Then it puts the window on-screen and makes it key.
See also: - window, - window:
|
- window |
This just calls -window: with NO as the argument.
See also: - window:, - showWindow:
|
- window:(BOOL)loadFlag |
Returns the controller's window. If the nib file is not loaded and loadFlag is YES, the nib file is loaded first. If the nib
file is not loaded and loadFlag is NO, nil is returned.
See also: - window, - showWindow:
|
- write:(NXTypedStream *)stream |
Writes the instance to the typed stream. Only the frame name is archived.
See also: - awake, - read: |