• 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
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Ron Lue-Sang <email@hidden>
  • Date: Mon, 22 Aug 2005 11:10:35 -0700

Date: Mon, 22 Aug 2005 11:08:24 +0200
From: zeno <email@hidden>
Subject: NSArrayController selection issue
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=ISO-8859-1

When executing:

if ([myArrController canSelectNext]) {
NSLog(@"selected row index before: %u", [myArrController selectionIndex]);
[myArrController selectNext:self];

This call gets performed on the next run of the main event loop. Don't call controller action methods in code and expect to see the result immediately. You can easily set the selection index to ([controller selectionIndex] + 1) % [controller count] or something



NSLog(@"selected row index after: %u", [myArrController selectionIndex]);
}


...on the console I get:

[Session started at 2005-08-22 10:51:49 +0200.]
2005-08-22 10:51:53.865 TestApp[938] selected row index before: 1
2005-08-22 10:51:53.866 TestApp[938] selected row index after: 1

Can anybody explain why "selected row index after" is not 2? (in the
UI the third row of the table (index=2) is actually selected)...


-----------------------------
Ronzilla
Core Bindings/Cocoa Data


_______________________________________________ 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
  • Prev by Date: Re: NSTextInput protocol - 'unmarkText' is late?
  • Next by Date: (no subject)
  • Previous by thread: Re: [NSSearchField] Strange new localization log under Tiger (SOLVED)
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread