• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSArrayController selectNext updating late
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController selectNext updating late


  • Subject: Re: NSArrayController selectNext updating late
  • From: Scott Anguish <email@hidden>
  • Date: Mon, 12 Sep 2005 04:44:49 -0400

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,
_______________________________________________
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


  • Follow-Ups:
    • Re: NSArrayController selectNext updating late
      • From: Kane Dijkman <email@hidden>
    • Re: NSArrayController selectNext updating late
      • From: j o a r <email@hidden>
References: 
 >NSArrayController selectNext updating late (From: Kane Dijkman <email@hidden>)

  • Prev by Date: Re: Deleted myself out of help
  • Next by Date: observing set mutations
  • Previous by thread: NSArrayController selectNext updating late
  • Next by thread: Re: NSArrayController selectNext updating late
  • Index(es):
    • Date
    • Thread