- Inherits From:
- NSObject
- Conforms To:
- RTSQLDataSource
- NSCoding
- Declared In:
- RTResultListSource.h
This is best used where you need to display a certain value, but you want the value of another column (say a integer primary key) to use.
returns the index to that should be selected in the popup for a second column value of value
- + resultListSourceForPopUp:
- - initWithCoder:
- - popUp
- - setPopUp:
- - session
- - setSession:
- - queryString
- - setQueryString:
- - setQueryStringNoExecute:
- - databaseName
- - setDatabaseName:
- - database
- - setDatabase:
- - noSelectionTitle
- - setNoSelectionTitle:
- - performQuery:
- - resultDisplayTitles
- - resultValues
- - valueOfSelectedItem
- - valueAtIndex:
- - selectItemWithValue:
- - displayedItemforValue:
- - indexForValue:
- - valueTypeConstant
+ (RTResultListSource *)resultListSourceForPopUp:(id)popUp
Returns the RTResultListSource's that is managing the specified popUp.
- (id <RTSQLDatabase>)database
Returns the database queried. This or the database name must be specified. If not, the first database in the session will be used.
- (NSString*)databaseName
Returns the name of the database queried. This or the database must be specified. If not, the first database in the session will be used.
- (id)displayedItemforValue:(id)value
returns the value (first column of result set) for the row with a second column value of value
- (int)indexForValue:(id)value
returns the index to that should be selected in the popup for a second column value of value
- (id)initWithCoder:(NSCoder*)coder
Initializer used when unarchving from a nib.
- (NSString*)noSelectionTitle
Returns the value displayed in the NSPopUpButton[Cell] that corresponds with a NULL value. If NULL, then NULL values are not allowed.
- (IBAction)performQuery:(id)sender
Executes the specified query and updates the values in the associated popup button. The sender is ignored.
- (id)popUp
Returns the NSPopUpButton[Cell] being managed.
- (NSString*)queryString
Returns the query string used to fetch data.
- (NSArray*)resultDisplayTitles
Returns array of titles to display in a popup. Suitable for binding to NSPopUpButton's content biding.
- (NSArray*)resultValues
Returns array of values matching -displayTitles. Suitable for binding to NSPopUpButton's contentValues biding.
- (void)selectItemWithValue:(id)value
Sets the popup's selection based on a value instead of a title.
- (id <RTSQLSession>)session
Returns the active session being used.
- (void)setDatabase:(id <RTSQLDatabase>)inDatabase
Sets the database queried. This or the database name must be specified. If not, the first database in the session will be used.
- (void)setDatabaseName:(NSString*)inName
Sets the name of the database queried. This or the database must be specified. If not, the first database in the session will be used.
- (void)setNoSelectionTitle:(NSString*)title
No method description.
- (void)setPopUp:(id)button
Sets the NSPopUpButton[Cell] being managed. If button is a NSTableColumn with a dataCell that is a NSPopUpButtonCell, the data cell will be used as the popup.
- (void)setQueryString:(NSString*)inQuery
Sets the query string used to fetch data.
- (void)setQueryStringNoExecute:(NSString*)inQuery
Variant of setQueryString: used by Interface Builder that does not execute the query.
- (void)setSession:(id <RTSQLSession>)inSession
Sets the active session being used.
- (id)valueAtIndex:(int)index
returns the value (second column of result set) for the specified index
- (id)valueOfSelectedItem
Returns the value (second column of result set) for the popup's selected index.
- (UInt32)valueTypeConstant
Returns the type constant for values