[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSTableView issue
From: |
Fred Kiefer |
Subject: |
Re: NSTableView issue |
Date: |
Mon, 11 Sep 2006 15:40:20 +0200 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060725) |
Hi Andreas,
did you have a look at the mail that Quentin send to this list less then
a week ago? He addresses a problem coming from a similar question you
send to this list previously. I hope that today I have time to implement
what he did suggest, perhaps you could check in parallel if this also
resolves your current problem.
Cheers
Fred
Andreas Höschler schrieb:
>
> I wondered why I could not select (Copy) a cell in a tableView in one of
> our apps. I finally found that thi sis due to
>
> - (void) setDataSource: (id)anObject
> {
> /* Used only for readability */
> const SEL sel_a = @selector (numberOfRowsInTableView:);
> const SEL sel_b = @selector (tableView:objectValueForTableColumn:row:);
> const SEL sel_c =
> @selector(tableView:setObjectValue:forTableColumn:row:);
> if (anObject && [anObject respondsToSelector: sel_a] == NO)
> {
> [NSException
> raise: NSInternalInconsistencyException
> format: @"Data Source doesn't respond to numberOfRowsInTableView:"];
> }
>
> if (anObject && [anObject respondsToSelector: sel_b] == NO)
> {
> [NSException raise: NSInternalInconsistencyException
> format: @"Data Source doesn't respond to "
> @"tableView:objectValueForTableColumn:row:"];
> }
>
>
> _dataSource_editable = [anObject respondsToSelector: sel_c];
>
> NSLog(@"setDataSource %@ %@ %d", anObject,
> NSStringFromSelector(sel_c), _dataSource_editable);
> /* We do *not* retain the dataSource, it's like a delegate */
> _dataSource = anObject;
>
> [self tile];
> [self reloadData];
> }
>
> _dataSource_editable being NO. I have not implemented
> tableView:setObjectValue:... in my data source, sincen I do not actually
> want ti edt the cells, but I wantto be able to select and copy from the
> columns I set to be editable. On MacOSX this works. A solution tomake
> this working on GNustep would be to implement the method in question and
> simply do nothing. But may be the SPEC sould be checked here. MacOSX at
> least behaves differently.
>
- NSTableView issue, Andreas Höschler, 2006/09/11
- Re: NSTableView issue,
Fred Kiefer <=