• 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
Go to next record in table view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Go to next record in table view


  • Subject: Go to next record in table view
  • From: Michèle Garoche <email@hidden>
  • Date: Wed, 19 Dec 2001 05:56:41 +0100

From a newbie:

In Travel Advisor (Learning Cocoa - chapter 10), I've implemented as mentioned below the method to go to the next record in table view.

Could someone tell me if it is the right way to do it?

Many thanks in advance.

- (IBAction)nextRecord:(id)sender
{
int aSelectedRow = [countryTableView selectedRow];
if ([countryKeys count] == 0)
{
return;
}
aSelectedRow = aSelectedRow + 1;
if (aSelectedRow >= [countryKeys count])
{
aSelectedRow = [countryKeys count] - aSelectedRow;
}
[countryTableView selectRow:aSelectedRow
byExtendingSelection:NO];
[self handleTVClick: countryTableView];
}


  • Prev by Date: Go to previous record in table view
  • Next by Date: Re: Drawing faster with NSImage???
  • Previous by thread: Go to previous record in table view
  • Next by thread: Validate a user entry
  • Index(es):
    • Date
    • Thread