ShiftDbo

This is the formal protocol that a bundle's principal class should use to add support for an RDBMS. It may take some queues from Cake's DboSource.

Tasks

Editing Favorites

Setting Advanced Preferences

Instance Methods

shiftEditor

This method needs to return a view with fields for editing a favorite.

- (NSView *) shiftEditor

Return Value

The view containing an editor for the favorite.

Discussion

The view does not need to take have Save and Cancel buttons; Shift handles those.

shiftLoadFavoriteIntoEditor:favorite

Shift calls this function right before displaying the editor. It will have the dictionary info that has been saved for the favorite that is about to be edited. If the user is adding a new entry then the dictionary passed to this method will be nil.

- (void) shiftLoadFavoriteIntoEditor:(NSDictionary *)favorite

Parameters

favorite
Dictionary containing the values stored for the favorite.

Discussion

If the RDBMS needs a password the code should be written to handle the password as a regular NSString in stored in the dictionary with the key of password. Shift will handle Keychain access.

The name key should be used to store the name of the entry as it should appear in Shift's source list and the favorites table in the preferences. If no name is given then Shift will assign one using the format "Favorite %d" where %d is the number of that favorite in the list.

The key type is reserved. Shift uses this key to store information about what RDBMS this favorite uses. If a value is set for this key then it will be overwritten.