Release 5. Copyright ©1994-1998 by TipTop Software, Inc. All Rights Reserved.
TTOBInspectorProtocol
Adopted By: | TTOBInspector |
Declared In: | <ObjBrowser/TTOBInspectProtocol.h> |
Protocol Description
This protocol is very similar to the IBInspectors protocol. The TTOBInspectorProtocol protocol declares the four methods that all inspectors in Objective-Browser must implement: inspectorName:, ok:, revert:, and wantsButtons. Since you invariably create an inspector by creating a subclass of TTOBInspector--a class that adopts the TTOBInspectorProtocol protocol--your inspector will inherit default implementations of these methods, which you can override..
Method Types
+ inspectorName![]() ![]() ![]() |
Class Methods
inspectorName
+ (NSString*)inspectorName |
Returns the name of inspectors which belong to this class. This name is used for the popup list which is used to select an inspector.
Instance Methods
ok:
![]() |
Implement in your subclass of TTOBInspector to commit the changes that the user makes in the Inspector panel. The OK button in the Inspector panel--if present--sends an ok: message when the user clicks it.
Your implementation of this method must send the same message to super:
- (void)ok:sender
{
/* your code to commit changes */
[super ok:sender];
}
The message to super replaces the broken "X" in the panel's close box with the standard "X", indicating that the changes have been committed.
See also: revert:,
touch: (TTOBInpsector class)
revert:
![]() |
Implement in your subclass of TTOBInspector to load data into the inspector's display. Objective-Browser sends this message to the inspector object whenever the inspector's display might need to be updated, for example, when the user opens the Inspector panel and the selected object in Interface Builder is of the type associated with this inspector object. The Revert button in the Inspector panel--if present--also sends a revert: message when the user clicks it.
Your subclass must implement this method, and it must send the same message to super as part of its implementation:
- (void)revert:sender
{
/* your code to inspect selected object */
[super revert:sender];
}
This message to super replaces the broken "X" in the panel's close box with the standard "X", indicating that the changes have been discarded.
See also: ok:,
touch: (TTOBInspector class)
wantsButtons
![]() |
Returns a boolean value indicating whether the inspector object requires Objective-Browser to display the OK and Revert buttons in the Inspector panel.
See also: wantsButtons (TTOBInspector class)
###