Re: Simple TableView App (problem)
Re: Simple TableView App (problem)
- Subject: Re: Simple TableView App (problem)
- From: Thomas Deniau <email@hidden>
- Date: Sun, 03 Feb 2002 19:14:36 +0100
Le 3/02/02 19:07, Thilo Ettelt disait :
>
- (IBAction)addValue:(id)sender
>
{
>
[myArray addObject:[valueText stringValue]];
Here you are adding a string to the array
>
[myTableView reloadData];
>
}
>
>
- (id)tableView:(NSTableView *)aTableView
>
objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
>
{
>
return [[myArray objectAtIndex:rowIndex] objectForKey:[aTableColumn
>
identifier]];
And here you seem to think that the object in the array is a dictionary.
So either modify objectValue... To use the string you added, either add a
dictionary with the right key/values in your button's action.
--
Thomas Deniau