Mercurial > cpython-lru_cache-weakref
diff Mac/OSX/PythonLauncher/PreferencesWindowController.m @ 26806:b204b4a72b4e legacy-trunk
Changed the input field for the interpreter to use (in the preferences
window) to a combobox listing the known interpreters.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Thu, 26 Dec 2002 22:10:53 +0000 |
| parents | a0d752be5577 |
| children | cdb1abc1b409 |
line wrap: on
line diff
--- a/Mac/OSX/PythonLauncher/PreferencesWindowController.m Thu Dec 26 21:17:42 2002 +0000 +++ b/Mac/OSX/PythonLauncher/PreferencesWindowController.m Thu Dec 26 22:10:53 2002 +0000 @@ -90,5 +90,21 @@ [self update_display]; }; +// NSComboBoxDataSource protocol +- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString +{ + return [[settings interpreters] indexOfObjectIdenticalTo: aString]; +} + +- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index +{ + return [[settings interpreters] objectAtIndex: index]; +} + +- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox +{ + return [[settings interpreters] count]; +} + @end
