• 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
Question regarding NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question regarding NSTableView


  • Subject: Question regarding NSTableView
  • From: Philipp Ringli <email@hidden>
  • Date: Wed, 2 Feb 2005 22:44:56 +0100

I getting this error message:

[Session started at 2005-02-02 22:26:06 +0100.]
2005-02-02 22:26:08.472 MTASC-X[1650] *** Illegal NSTableView data source (<Controller: 0x353110>). Must implement numberOfRowsInTableView: and tableView:objectValueForTableColumn:row:


I have connected the NSViewTable in IB.
Class Controller has these Attributes:

Outlets:
Outletname: classPathTable Type: id (couldn't this be NSTableView?)

Actions:
addRecord:
saveRecords:
deleteRecords:

In NSTableView Info Panel I have an outlet DataSource -> Controller

In Controller (Custom) Info Panel I have an outlet classPathTable -> NSTableView(Classpath, Active)


These are excerpts of code from the respective files:

in my Controller.h:
------------------------------------------------
NSMutableArray *classPathRecords; // an array holding dictionary Objects
IBOutlet id classPathTable; // Ref to View: NSTableView (NIB)

- (IBAction)addRecord:(id)sender;
- (IBAction)saveRecords:(id)sender;
- (IBAction)deleteRecords:(id)sender;

in my Controller.m:
------------------------------------------------
// Handling Classpath Table

-(NSDictionary *)createRecord
{
  NSMutableDictionary *record = [NSMutableDictionary dictionary];
  [record setObject:@"Please enter Classpath..." forKey:@"classpath"];
  return record;
}

- (IBAction) addRecord:(id) sender
{
	[classPathRecords addObject:[self createRecord]];
	[classPathTable reloadData];
	NSLog (@"\nclassPathTable:%@", classPathTable);
}

- (IBAction) deleteRecords:(id) sender
{
}

- (IBAction) saveRecords:(id) sender
{
}


-(void)awakeFromNib { classPathRecords = [[NSMutableArray alloc] init]; }

-------------------------------------------------


I am *very* new to cocoa, and objective-c. (...you might have already noticed. ;-) )
Any tip is welcome.



Thanks for reading, Phil



_______________________________________________
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


  • Follow-Ups:
    • Re: Question regarding NSTableView
      • From: Robert Cerny <email@hidden>
  • Prev by Date: Re: Patching, upgrading in the future...
  • Next by Date: difference between frameworks and plugins
  • Previous by thread: Re: NSDocument setFileName - File Must Exist?
  • Next by thread: Re: Question regarding NSTableView
  • Index(es):
    • Date
    • Thread