Re: How get:int:col:OfCell works?
Re: How get:int:col:OfCell works?
- Subject: Re: How get:int:col:OfCell works?
- From: David Remahl <email@hidden>
- Date: Sat, 25 May 2002 11:59:43 +0200
The correct way to use getCol:column:ofCell: is to pass a pointer to the int
value, not the pointer value the integer represents as you do below.
checkCell = [view getRow:&row column:&col ofCell:buttonCell];
/ Sincerely, David
>
Hi all,
>
I have created a NSMatrix for group of Buttons and
>
i wanted to find the row and col of the button on
>
click of a button .The code for which is as follows
>
but i am getting "EXC_BAD_ACCESS" while debugging.
>
- (IBAction)change:(id)sender
>
> {
>
> int row,col;
>
> NSImage *XImage,*OImage;
>
> NSButtonCell *buttonCell;
>
>
> XImage = [NSImage imageNamed:@"x.tiff"];
>
> [XImage setSize:NSMakeSize(65,90)];
>
>
>
> OImage = [NSImage imageNamed:@"o.tiff"];
>
> [OImage setSize:NSMakeSize(65,90)];
>
>
>
> buttonCell = [sender selectedCell];
>
> checkCell=[View getRow:(int *)row column:(int
>
> *)col ofCell:(NSCell *)buttonCell];
>
> [selectedCell setImage:XImage];
>
> [selectedCell setEnabled:NO];
>
> ........
>
> .........
>
> }
_______________________________________________
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.