Re: binding NSComboBox default selection

2010-01-07 Thread Mazen M. Abdel-Rahman
From: Quincey Morris Subject: Re: binding NSComboBox default selection To: cocoa-dev Message-ID: Content-Type: text/plain; charset=us-ascii > > > On Jan 7, 2010, at 09:02, Mazen M. Abdel-Rahman wrote: > >> NSString * defaultSelectionValue = [myDS defaultSelectionValue];

Re: binding NSComboBox default selection

2010-01-07 Thread Quincey Morris
On Jan 7, 2010, at 09:02, Mazen M. Abdel-Rahman wrote: > NSString * defaultSelectionValue = [myDS defaultSelectionValue]; > > NSUInteger defaultSelectionIndex = [myDS comboBox:self > indexOfItemWithStringValue:defaultSelectionValue]; > > [self selectItemAtIndex:defaultSelectionIndex]; >

binding NSComboBox default selection

2010-01-07 Thread Mazen M. Abdel-Rahman
Hi All, I have an NSComboBox that is bound to a datasource. I want to programatically select a default selection when the sheet the combobox is in is first displayed. To do so I am doing the following: NSString * defaultSelectionValue = [myDS defaultSelectionValue]; NSUInteger defaultSelecti