Re: DoubleClick in a NSTableView
Re: DoubleClick in a NSTableView
- Subject: Re: DoubleClick in a NSTableView
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 10 Jun 2002 13:35:13 -0400
on 02-06-10 9:29 AM, Frank Blome at email@hidden wrote:
>
The short story: After my app now started to crash with a SigBus error I
>
decide to clean the target (agin) and (here comes the difference)
>
_restart_ my Powerbook (running 10.1.5). After the next build my dc runs.
>
Please don't ask my why...
Happens to me all the time. My first step when something looks like it
should work but doesn't is to clean the target and rebuild it.
>
But now I have another side affect: I have a switch in the preferences,
>
where I can set the editable on or off. The method itself looks like this:
>
>
- (IBAction)setLockMode:(id)sender
>
{
>
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
>
NSTableColumn *typeColumn = [table
>
tableColumnWithIdentifier:@"filterRow"];
>
BOOL isEditable;
>
>
if ([sender state]==YES)
>
isEditable = NO;
>
else
>
isEditable = YES;
>
>
[[typeColumn dataCell] setEditable:isEditable];
>
[defaults setBool:[sender state] forKey:@"LockMode"];
>
}
I believe the next-to-last line should be:
[typeColumn setEditable:isEditable];
Look at the NSTableColumn class reference document under setEditable:. The
dataCell is a special, shared instance of the cells used in a column, and it
is usually (always?) used to set display attributes.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.