Error Message Bug in NSArrayController / NSTableView?
Error Message Bug in NSArrayController / NSTableView?
- Subject: Error Message Bug in NSArrayController / NSTableView?
- From: DumberThanDanQuayle <email@hidden>
- Date: Tue, 25 Jan 2005 16:41:28 -0500
Hi Mike,
I am now dealing with apparently the same issue that you ran into last month, copied below. Now, I think that I can isolate the "illegal data source" issue to cases where the NSTableView is inserted into an NSView via InterfaceBuilder. Specifically, I can generate the apparently bogus warning message in MMalc's "BookMarks" example by making this simply modification. Furthermore, as far as I can tell, NSArrayController does not implement the methods -numberOfRowsTableView: and -tableView: objectValueForTableColumn: row:, thus some kind of runtime hack is being used. My guess is that this hack is being exposed and slightly broken in our cases.
So, I am wondering where you got with this case. Did you solve the problem or file a bug report?
~George.
<x-tad-bigger>"The truth of that matter is, if you listen carefully, Saddam would still be in power if he were the president of the United States, and the world would be a lot better off."
—George W. Bush, second presidential debate
St. Louis, Mo., Oct. 8, 2004</x-tad-bigger>
<x-tad-bigger>FROM : Mike Solomon
DATE : Wed Dec 22 12:11:00 2004
Hi all. I saw a conversation a couple of weeks earlier about using a
NSArrayController subclass as a dataSource to get drag and drop support
in an NSTableView.
I too get the following message:
2004-12-22 02:40:42.216 ******[27415] *** Illegal NSTableView data
source (<DTArrayController: 0x19221a0>[object class: NSString, number
of selected objects: 1]). Must implement numberOfRowsInTableView: and
tableView:objectValueForTableColumn:row:
(DTArrayController is a subclass of NSArrayController)
Now, the code basically works. The binding specified in the nib read
the correct data and the rows/columns are filled out correctly. I can
drag data into the table view and the appropriate code is called and
additions to the bound array are reflected in the UI.
As far as I can tell, everything is working correctly, yet I get this
message on the Console. The most unbelievable part is that I have
another table view in the same application that is working fine - no
error message. Clearly these messages don't need to be implemented. I
actually tried implementing them, to see if it was just a false alarm,
but implementing those messages prevents the data from the bindings
from showing up in the table.
Obviously, if I disconnect the dataSource in the nib, the error message
goes away, but so does drag and drop. The other instance works
perfectly fine. Maybe the haze of 3am is setting in, but I am
completely stumped.
The sample app Bookmarks from
</x-tad-bigger><x-tad-bigger>http://homepage.mac.com/mmalc/CocoaExamples/controllers.html</x-tad-bigger><x-tad-bigger> seems to
be doing the same thing, but after a quick download and compile, it
does not produce this error message...
Am I missing something completely obvious? Is this message safe to
ignore?
Any help would be most appreciated. Thanks all.
-Mike</x-tad-bigger>
_______________________________________________
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