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

Go to previous record in table view


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

From a newbie:

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

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

Many thanks in advance.

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


  • Prev by Date: NSMutableAttributeString, fonts and alignment
  • Next by Date: Go to next record in table view
  • Previous by thread: Re: NSMutableAttributeString, fonts and alignment
  • Next by thread: Go to next record in table view
  • Index(es):
    • Date
    • Thread