• 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: SQLite and TableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQLite and TableView


  • Subject: Re: SQLite and TableView
  • From: Sherm Pendley <email@hidden>
  • Date: Mon, 14 Jul 2003 19:08:42 -0400

On Monday, July 14, 2003, at 06:44 PM, Sanri Parov wrote:

I know I have to implement these two protocols

A (very!) minor point: You have to implement *one* protocol, NSTableDataSource, which consists of these two methods.

- (int)numberOfRowsInTableView:(NSTableView *)aTableView{}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex{}

1) How to populate in the simplest way the table?

The table will populate itself by calling the second method as needed.

2) Must I transform the return query values to an NSMutableArray?

No, you can store them however best suits your app. Note, however, that you must be able to quickly retrieve them given an integer index - usually, the best way to do that is to fetch them from some sort of array.

3) When and how must I redraw the TableView?

You don't. The TableView knows what rows are visible and need to be redrawn, and it will call the second method above as needed, and redraw itself.

sherm--

Welcome to Rivendell, Mr. Anderson.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >SQLite and TableView (From: Sanri Parov <email@hidden>)

  • Prev by Date: SQLite and TableView
  • Next by Date: Re: SQLite and TableView
  • Previous by thread: SQLite and TableView
  • Next by thread: Re: SQLite and TableView
  • Index(es):
    • Date
    • Thread