Release 1.0  Copyright ©1994 by Don Yacktman.  All Rights Reserved.





MiscInfo




Inherits From: Object
Declared In: <misckit/MiscInfo.h>



Class Description

The MiscInfo object sits underneath an application's Info... panel.  It is used to make the panel appear when requested by the user and initiate animation in the panel, if any.  It also keeps several text fields in the panel up to date, namely the version number and date and the serial number of registered applications.  If can be queried by other application objects that need to know the version number and/or release date of the current version.  It uses it's own .nib file and loads it if necessary.  The name of the Info... panel's .nib file should be " InfoPanel.nib".

The current version number and release date of this version are both stored in an NXStringTable.  If an NXStringTable is not connected up in the "InfoPanel.nib" file, then the controller's string table is used instead.  (The controller is a MiscInfoController which is using this MiscInfo instance.)  The table is expected to contain the following keys:

Version -- the application's version number
VersionDate -- the release date of this version of the application

An appropriate .nib file will be named InfoPanel.nib and have a MiscInfo object as the file's owner.  Look at the example .nib file in the MiscKit examples for a sample .nib file.



Instance Variables

id strings;
id controller;
id infoPanel;
id niftyView;
id versionText;
id versionDateText;
id regText;


strings The NXStringTable which contains version info about the application.
controller The application's instance of MiscInfoController.
infoPanel The Window object which is the Info panel.
niftyView A View object subclass which may be used to create animations in the Info... panel. See the MiscAnimatedView for more information.
versionText A TextField in the Info... panel where the version number is displayed.
versionDateText A TextField in the Info... panel where the version date is displayed.
regText A TextField in the Info... panel where the registered serial number is displayed.




Method Types

Manipulating the Info... panel - info:
- infoPanel
- updateSerialNumber
Getting info about the application - versionDateString
- versionString
Other Methods - init
- niftyView
- setController:



Instance Methods

info:
info:sender

Brings up the Info... panel.  Before showing the panel, the various text fields are loaded with the version number, date, and the serial number (if registered).  If the panel contains a MiscAnimatedView it sends the view a -start: message. Returns self.

See also:  -infoPanel




infoPanel

infoPanel

Returns the Info... panel, an instance of the Window class.  If necessary, it is loaded from "InfoPanel.nib" from the appropriate application .lproj directory.

See also:  -info:




init

init

Initializes a new instance of MiscInfo.  Returns self.




niftyView

niftyView

Returns the MiscAnimatedView which is on the Info... panel, if there is one.

See also:  -info:




setController:

setController:sender

Sets the controller of the receiving MiscInfo instance.  Sender is assumed to be a MiscInfoController instance.  Returns self.




updateSerialNumber
updateSerialNumber

Updates the serial number displayed by the TextField connected to the regText outlet.  Typically, this method is called by the MiscRegistration object whenever the serial number is changed.  Returns self.




versionDateString
-  (const char *)versionDateString

Returns the release date of this version of the application, as found in the strings NXStringTable.

See also:  -versionString:




versionString
-  (const char *)versionString

Returns the version number of the application, as found in the strings NXStringTable.

See also:  -versionDateString: