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

Simple TableView App (problem)


  • Subject: Simple TableView App (problem)
  • From: Thilo Ettelt <email@hidden>
  • Date: Sun, 3 Feb 2002 19:07:06 +0100

Hi folks!

I'm experimenting with the TableView. The concept of a view and an object is pretty complicated for me, but I want to get it work. So I wrote a little app with a tableview, a textfield and a button, I connected everything properly in the IB. The PB shows up no errors when compiling, but the function, that should be provided by the app doesn't work. It should simply add a row to the tableview...

Can anybody help me?


Cheers, Thilo

--

- (IBAction)addValue:(id)sender
{
[myArray addObject:[valueText stringValue]];
[myTableView reloadData];
}

- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
return [[myArray objectAtIndex:rowIndex] objectForKey:[aTableColumn identifier]];
}

- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
return [myArray count];
}


- (id)init
{
self = [super init];
return self;
}


- (void)dealloc
{
[myArray release];
[super dealloc];
}

- (NSMutableArray *)myArray
{
return myArray;
}

--


  • Follow-Ups:
    • Re: Simple TableView App (problem)
      • From: email@hidden
    • Re: Simple TableView App (problem)
      • From: Serge Meynard <email@hidden>
    • Re: Simple TableView App (problem)
      • From: Thomas Deniau <email@hidden>
  • Prev by Date: Re: Using NSApplication.endSheet() in the Java API
  • Next by Date: Re: Simple TableView App (problem)
  • Previous by thread: getting the size of a folder
  • Next by thread: Re: Simple TableView App (problem)
  • Index(es):
    • Date
    • Thread