WToolbox


Inherits From:
NSObject
Declared In:
WToolbox.h


Class Description

WToolbox is created. Create a simple "context" dictionary so tools can sort of talk to each other.


Instance Variables

IBOutlet HidingProgress *oProgress;
IBOutlet NSTextField *oStatus;
IBOutlet NSTextField *oLoadStatus;
IBOutlet NSButton *oMoreButton;
NSMutableDictionary *mContext;

oProgressNo description.
oStatusNo description.
oLoadStatusNo description.
oMoreButtonNo description.
mContextNo description.


Method Types

- autoFillDictionary
- setAutoFillDictionaryObject:forKey:
- progressBar
- showStatus:
- showStatusError:
- showStatusNoneFound
- showStatusNoConnect
- showStatusLoad:
- showStatusLoadCount:
- showStatusLoadCount:of:
- showStatusClear
- enableMore:
- saveStatusBar
- restoreStatusBar:
- bundles
- switchToToolIdentifier:
- context

Instance Methods

autoFillDictionary

- (NSDictionary *)autoFillDictionary

Return the auto-fill dictionary, of useful keys and values of user information. This is the useful information about a user for help in initially populating new forms. All of these are settable in the preferences dialog, and if they are empty when a module needs them, the module should set it for the user once that information is determined.

Built-in keys are:
address
address2
city
company
country
email
firstname
homephone
lastname
state
title
userid
workphone
zip


bundles

- (NSDictionary *)bundles

Return a dictionary of all the loaded bundles, keyed by their identifier. A tool can use this to query what other tools are installed.


context

- (NSMutableDictionary *)context

Return a mutable dictionary for this toolbox. This is a way that tools could sort of communicate with each other. One could set something in the context dictionary, and another could look for a known message in the context dictionary and act upon it, on toolSelected perhaps, and then remove the message when it's picked up. Pretty lightweight, but it's a start.


enableMore:

- (void)enableMore:(BOOL)inEnable

Enable the "More" button, displaying immediately. (Available in Watson 1.5 and later)


progressBar

- (HidingProgress *)progressBar

Return outlet to window's progress bar. (Available in Watson 1.5 and later)


restoreStatusBar:

- (void)restoreStatusBar:(NSDictionary *)inSavedState

Restore the state of the status bar from the given dictionary


saveStatusBar

- (NSDictionary *)saveStatusBar

Save the state of the status bar into a dictionary, for later restoration


setAutoFillDictionaryObject:forKey:

- (void)setAutoFillDictionaryObject:(id)inObject forKey:(id)inKey

Put a useful piece of information about user into auto-fill dictionary, for others to use.


showStatus:

- (void)showStatus:(NSString *)inString

Set the status to the given text. Nil is OK. Displays immediately. (Available in Watson 1.5 and later) Message shouldn't be more than about 300 pixels.


showStatusClear

- (void)showStatusClear

Clears both status fields immediately. (Available in Watson 1.5 and later)


showStatusError:

- (void)showStatusError:(NSString *)inString

Set the load status to the given text for an error message. Nils are OK. Displays immediately. (Available in Watson 1.5 and later)


showStatusLoad:

- (void)showStatusLoad:(NSString *)inString

Set the load status to the given text. Nils are OK. Displays immediately. (Available in Watson 1.5 and later) Message shouldn't be more than about 130 pixels.


showStatusLoadCount:

- (void)showStatusLoadCount:(int)inCount

Set the status to show n results. (Available in Watson 1.5 and later)


showStatusLoadCount:of:

- (void)showStatusLoadCount:(int)inCount of:(int)inTotal

Set the status to show n out of m results. If equivalant, just shows the total. (Available in Watson 1.5 and later)


showStatusNoConnect

- (void)showStatusNoConnect

Set the status to the given standard text for when none is found. Displays immediately. (Available in Watson 1.5 and later)


showStatusNoneFound

- (void)showStatusNoneFound

Set the status to the given standard text for when none is found. Displays immediately. (Available in Watson 1.5 and later)


switchToToolIdentifier:

- (BOOL)switchToToolIdentifier:(NSString *)inBundleIdentifier

switch to a different tool. Get the tool bundle from the identifier, the key from the bundles dictionary. Returns YES if it could find the bundle to switch to.


Version 1.1 Copyright ©2003 by Karelia Software, LLC. All Rights Reserved.