Re: NSArrayController selectNext updating late
Re: NSArrayController selectNext updating late
- Subject: Re: NSArrayController selectNext updating late
- From: Kane Dijkman <email@hidden>
- Date: Tue, 13 Sep 2005 18:01:06 -0700
Thanks for the hint. With it I found a previous response of yours and
from that figured I can use canSelectNext and that works great.
if([listController canSelectNext])
{ [listController setSelectionIndex:[listController
selectionIndex]+1]; }
Thanks,
Kane
On Sep 12, 2005, at 1:44 AM, Scott Anguish wrote:
In 10.4 the action methods are performed delayed, to allow for
sheets to be presented that can provide error feedback.
this is expected behavior.
On Sep 11, 2005, at 10:53 PM, Kane Dijkman wrote:
I have an NSArrayController with a list of values in it that is
Bound to an NSTableView. Lets say 1, 2, 3
I have a button to step through the list and run some code to
update the display using selectNext and then getting the
selectedObjects.
The problem is that if I am on value 1 and hit the button that
does the selectNext and then update the dispaly, the display gets
updated for value 1 and then once the update code is done the
NSTableView then selects the next value of 2.
Likvewise when two is selected and the button is pressed 2 gets
updated and then 3 gets selected. When I am expecting that 3
should get selected and then the view would be updated for 3.
So, why is the update happening before the select changes? And how
can I fix this?
Here is the relevant code:
\/ The button calls the next: method.
- (IBAction)next:(id)sender
{
[listController selectNext:self];
[self display];
}
- (IBAction)display
{
NSMutableArray * theObjectArray = [listController
selectedObjects];
NSString * theSymbol = [[theObjectArray objectAtIndex:0] symbol];
NSLog(@"theSymbol %@", theSymbol);
...
do stuff to update display
...
}
Thanks,
------------------------------------------------------------------------
-------------
In Minnesota it is illegal to cross state lines with a duck on your
head.
http://www.geocities.com/Athens/Forum/4255/youknow.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden