| Santa Claus 2005-11-10, 9:58 pm |
| In article <1131416818.359187.105850@g49g2000cwa.googlegroups.com>,
"Wizumwalt@gmail.com" <Wizumwalt@gmail.com> wrote:
> I have an NSMutableArray of DataRecord objects which looks like this
> ...
>
> @interface DataRecord : NSObject
> {
> NSNumber * index; // index int
> NSMutableArray *data; // array of 3 floats
> }
>
> My NSTableView should display the data from this DataRecord object as
> such ...
>
> Index Data1 Data2 Data3
> 1 2.0 3.0 1.1
> 2 3.2 2.2 2.3
> ...
>
> What I can't figure out is how to get each value from this data array
> into the columns of this table using objectValueForTableColumn method.
>
> Any help much appreciated.
take the index (i presume that's what it's for) and get the intValue of it, feed that into the objectAtIndex method for the array and return your float value.
float mytemp = [[data objectAtIndex: [index intValue]] floatValue];
now referencing them from the datarecord is another item entirely. that i dont know how to do.
|