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

SQLite and TableView


  • Subject: SQLite and TableView
  • From: Sanri Parov <email@hidden>
  • Date: Tue, 15 Jul 2003 00:44:59 +0200

Hi everybody,

since I'm fairly new to delegation system, I'll ask your help to return
the results of a query from SQLDatabase wrapper for SQLite to an
NSTableView.
Let's say my database is very simple: the records are 'name' and 'age'
(TEXT and INTEGER).
I know I have to implement these two protocols

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

In the first case it's very simple to get the number of the rows from
my database, but the second one leaves me with some doubts:

1) How to populate in the simplest way the table?
2) Must I transform the return query values to an NSMutableArray?
3) When and how must I redraw the TableView? As far as it's into a
drawer, before or after the drawer is opened?

Thank you very much for any answer! :-))

--
Sanri Parov
_______________________________________________
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.

  • Follow-Ups:
    • Re: SQLite and TableView
      • From: Andreas Mayer <email@hidden>
    • Re: SQLite and TableView
      • From: Sherm Pendley <email@hidden>
  • Prev by Date: Hide and go seek.
  • Next by Date: Re: SQLite and TableView
  • Previous by thread: Re: Hide and go seek.
  • Next by thread: Re: SQLite and TableView
  • Index(es):
    • Date
    • Thread