RTMasterDetailDataSource


Inherits From:
NSObject
Declared In:
RTMasterDetailDataSource.h


Class Description

No class description.


Method Types

- masterDataSource
- setMasterDataSource:
- database
- setDatabase:
- table
- setTable:
- tableView
- setTableView:
- isToMany
- setIsToMany:
- addRemoveColumns
- setAddRemoveColumns:
- updateColumnTitles
- setUpdateColumnTitles:
- editable
- setEditable:
- keyMap
- setKeyMap:
- masterColumnNames
- insertRow:
- deleteSelectedRows:

Instance Methods

addRemoveColumns

- (BOOL)addRemoveColumns

Returns YES if all the columns of the NSTableView should be replaced with ones for each column in the detail result set.


database

- (id <RTSQLDatabase>)database

Returns the database used by this data source.


deleteSelectedRows:

- (IBAction)deleteSelectedRows:(id)sender

Marks the selected rows for deletion when save: is called on the rowEditor for the master data source


editable

- (BOOL)editable

Returns YES if the detail rows are editable.


insertRow:

- (IBAction)insertRow:(id)sender

inserts a new row with default values including the link back to the master table.


isToMany

- (BOOL)isToMany

Returns YES if there can be more than one detail row for each master row.


keyMap

- (NSDictionary*)keyMap

Returns a NSDictionary whose keys are master column names and the objects are the matching detail table column names.


masterColumnNames

- (NSArray*)masterColumnNames

returns array with the names of columns used from the masterDataSource.


masterDataSource

- (RTEditableDataSource *)masterDataSource

Returns the RTEditableDataSource whose current row will be the master record.


setAddRemoveColumns:

- (void)setAddRemoveColumns:(BOOL)addRemove

Set to YES if all the columns of the NSTableView should be replaced with ones for each column in the detail result set.


setDatabase:

- (void)setDatabase:(id <RTSQLDatabase>)inDatabase

Sets the database used by this data source.


setEditable:

- (void)setEditable:(BOOL)edit

Sets if the detail rows are editable.


setIsToMany:

- (void)setIsToMany:(BOOL)toMany

Sets if there can be more than one detail row for each master row.


setKeyMap:

- (void)setKeyMap:(NSDictionary*)dict

dict should be a NSDictionary whose keys are master column names and the objects are the matching detail table column names. These columns will be used to fetch the matching detail rows for each master row.


setMasterDataSource:

- (void)setMasterDataSource:(RTEditableDataSource *)dataSource

Sets the RTEditableDataSource whose current row will be the master record.


setTable:

- (void)setTable:(id <RTSQLTable>)inTable

Sets the sql table used by this data source.


setTableView:

- (void)setTableView:(NSTableView*)inTableView

Sets the NSTableView this object is the data source for.


setUpdateColumnTitles:

- (void)setUpdateColumnTitles:(BOOL)update

Set to YES if all the titles of the columns of the NSTableView should be updated to the name of each column in the detail result set.


table

- (id <RTSQLTable>)table

Returns the sql table used by this data source.


tableView

- (NSTableView*)tableView

Returns the NSTableView this object is the data source for.


updateColumnTitles

- (BOOL)updateColumnTitles

Returns YES if all the titles of the columns of the NSTableView should be updated to the name of each column in the detail result set.


Copyright ©2006 by Runtime Labs, Inc.. All Rights Reserved.