• 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: 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


References: 
 >NSArrayController selectNext updating late (From: Kane Dijkman <email@hidden>)
 >Re: NSArrayController selectNext updating late (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: How to add toolbar into Mail.App
  • Next by Date: Re: Core data model - binding question
  • Previous by thread: Re: NSArrayController selectNext updating late
  • Next by thread: Re: NSArrayController selectNext updating late
  • Index(es):
    • Date
    • Thread