• 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
NSTableView with NSArray and C-array question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView with NSArray and C-array question


  • Subject: NSTableView with NSArray and C-array question
  • From: Gilles Celli <email@hidden>
  • Date: Thu, 12 Oct 2006 18:18:37 +0200

Hello everyone,

My first post here, I hope it fits in this list...

I'm porting a C-based data acquistion program running in Mac OS X Terminal.app to Cocoa.

The C-based data acq. program scans 16 channels from a Keithley 2700 (with 7700 multiplexer) Multimeter every 5 seconds via USB-to-Serial Port.
The multimeter spits out a string which then I convert to 'double' float values in a C-array. This works great since a couple of months.


The main part of it, acquiring data every 5 sec works fine also in Cocoa (using NSTimer etc.)

However displaying the data with NSTableView gives me more headaches...

[1]. Should I use only *one* NSMutableArray or *multiple* NSMutableArray for the channels ?
My understanding is that NSTableView needs an NSArray to display the data row-wise, so I can't use the C-array directly....


(Since the array grows up every 5 seconds....(so for one day we get about: 86400sec / 5sec = 17280 lines).
So for 16 channels: (16*17280) = 276480 data values for a full day...this will make a really big array, IMHO.)


[2]. How to simplify the output of data with method (id)tableView: (NSTableView *)tableView objectValueForTableColumn....?

I've tried using this for the 16 columns:

if ( [[Column identifier] isEqualToString:@"1"])
	{
		return  [array objectAtIndex:Row];
	}
etc.

This works less or more but every row gets the same value as the row before!!! It drives me nuts!
Does someone have any suggestions with [array valueForKey....] ?


Any suggestions will be greatly appreciated.

Cheers,

Gilles Celli

_______________________________________________
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


  • Follow-Ups:
    • Re: NSTableView with NSArray and C-array question
      • From: "Mark Munz" <email@hidden>
  • Prev by Date: Re: Using CoreData as disconnected cache (Populating CoreData programmatically)
  • Next by Date: Re: NSTableView with NSArray and C-array question
  • Previous by thread: Re: https upload/download with users and passwords
  • Next by thread: Re: NSTableView with NSArray and C-array question
  • Index(es):
    • Date
    • Thread