Release 5.  Copyright ©1994-1998 by TipTop Software, Inc.  All Rights Reserved.






TTOBInspector




Inherits From: NSObject
Conforms To: TTOBInspectorProtocol
Declared In: <ObjBrowser/TTOBInspector.h>




Class Description

The TTOBInspector class defines the interface between an inspector for a loadable module and the Objective-Browser bundle.  When you build a new inspector for Objective-Browser, you create a subclass of TTOBInspector.

The inspector you define must load its interface (that is, the nib file containing the interface), and it must override the inherited ok:, revert:, and wantsButtons methods.  The nib file is generally loaded as part of the inspector's init method.  The wantsButtons method controls whether the inspector displays OK and Revert buttons.  (As with Objective-Browser's standard inspectors, most custom inspectors won't need these buttons--instead, the user's actions in the Inspector panel are registered immediately by the inspected object.)  The ok: and revert: methods control the synchronization of the Inspector panel's state with that of the inspected object.  Objective-Browser sends the inspector a revert: message to make the inspector reflect the current state of the inspected object.  The ok: message should cause the inspector to set the state of the inspected object to that displayed in the Inspector panel.

An inspector should send itself a touch: message when the user begins modifying the data it displays.  This message displays a broken "X" in the panel's close box and enables the inspector's OK and Revert buttons, if present.  (See textDidChange: for alternate way to achieve this result.)




Method Types

cell
info
initAndLoadNib
loadNib:
object
revert:
textDidChange:
touch:
window




Instance Methods

cell
  (TTOBCell*)cell

Returns the cell that's being inspected.

See also:  -info, -object




info
  (id)info

Returns the info object for the cell that's being inspected.

See also:  -cell, -object




initAndLoadNib
  initAndLoadNib

This method initializes the inspector and loads the user interface for the inspector from a nib file using the -loadNib: method.  The nib file name is the same as the class name.  When you subclass the TTOBInspector class, you should implement -init as:

method - init {
$self initAndLoadNib
# Your own initialization
...
return $self
}

See also:  -loadNib:




loadNib:
  (BOOL)loadNib:(NSString *)name

Loads the user interface for the inspector from a nib file name.

See also:  -initAndLoadNib




object
  (id)object

Returns the object that corresponds to a call that's being inspected in Objective-Browser.

See also:  -cell, -info




textDidChange:
  (void)textDidChange:sender

Sends the TTOBInspector a touch: message on behalf of some Text object in the Inspector panel.

By making your inspector object the delegate of any Text object in the Inspector panel, the panel will be updated appropriately as the user alters the panel's contents.

See also:  touch:




touch:
  (void)touch:sender

Changes the image in the Inspector panel's close box to a broken "X" to indicate that the contents have been edited. Also, enables the buttons that allow the user to commit or abandon changes.

See also:  textDidChange:




window
  (NSWindow*)window

Returns the Window object that contains the user interface for the inspector.




###