• 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: Newbie: Basic problem with NSTableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie: Basic problem with NSTableview


  • Subject: Re: Newbie: Basic problem with NSTableview
  • From: Claudio Procida <email@hidden>
  • Date: Sun, 03 Sep 2006 22:44:22 +0200

Marcus Pedersén ha scritto:
Hi all!
I found a tutorial regarding NSTableview and according to that tutorial I was supposed to make a connection from my controller class to my NSTableview in Interface Builder. I did that.
After that I was supposed to write two methods in my controller class that my NSTableview gets the info from,
Just to try it out I did the following but nothing happend.(My columbs has the visible names Date, Time and Remember). I even tried (just as a test) to make a button click make: [ myTableView reloadDate ] but nothing happend.


Many thanks

Marcus

-(int)numberOfRowsInTableView:(NSTableView *)tableView{
return 1;
}

- (id)tableView:(NSTableView *)tableView
objectValueForTableColumn:(NSTableColumn *)tableColumn
row:(int)row
{
NSString *value=nil;
if([[tableColumn identifier]isEqualToString: @"Date"]){
value = @"2004-11-12";
}
if([[tableColumn identifier]isEqualToString: @"Time"]){
value = @"12:34";
}
if([[tableColumn identifier]isEqualToString: @"Remember"]){
value = @"A realy realy good thing to remember";
}
return value;
You're supposed to make your controller the NSTableView's dataSource instead.
ctrl drag from the tavble view to the controller object and connect it to the dataSource outlet.


Claudio
--
http://www.emeraldion.it
_______________________________________________
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


References: 
 >Newbie: Basic problem with NSTableview (From: Marcus Pedersén <email@hidden>)

  • Prev by Date: Re: Newbie: Basic problem with NSTableview
  • Next by Date: Printing outside of NSView bounds
  • Previous by thread: Re: Newbie: Basic problem with NSTableview
  • Next by thread: Cora Data inverse relations and inherited entities
  • Index(es):
    • Date
    • Thread