• 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: Simple TableView App (problem)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Simple TableView App (problem) (From: Thilo Ettelt <email@hidden>)

  • Prev by Date: Simple TableView App (problem)
  • Next by Date: NSDrawer open at startup
  • Previous by thread: Simple TableView App (problem)
  • Next by thread: Re: Simple TableView App (problem)
  • Index(es):
    • Date
    • Thread