Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Array help!



d
On Jul 17, 2008, at 4:50 PM, Eric Lee wrote:
Warning: 'NSScrollView' may not respond to '-reloadData' (Messages without a matching method signature will be assumed to return 'id' and accept '...' as arguments)

It's saying you are trying to send a reloadData message to an instance of NSScrollView. NSScrollViews do not have a reloadData method. So the diagnostic approach would be to look for where you have an NSScrollView and where you are sending a reloadData message to it.


[tableView reloadData];

There's your reloadData message...

@interface AppController : NSObject {
	NSMutableArray *array;
	IBOutlet NSTextField *textField;
	IBOutlet NSScrollView *tableView;

...and sure enough, although you've named it tableView, you've declared it as an NSScrollView, but more importantly...


I've connected everything.

...you connected your tableView outlet to an instance of NSScrollView. Change the instance variable declaration from NSScrollView * to NSTableView *. Go back to IB and make sure you connect the outlet to an NSTableView. Your code is written to expect an NSTableView.


Also, I think there are other problems, since when I press a button that's supposed to add an object into the TableView, nothing happens, even though a log appears on the console.

This is explained by the errors above.

--Andy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Array help! (From: Eric Lee <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.