• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How get:int:col:OfCell works?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >How get:int:col:OfCell works? (From: praveena tandon <email@hidden>)

  • Prev by Date: How get:int:col:OfCell works?
  • Next by Date: Re: cocoa-dev digest, Vol 2 #672 - 18 msgs
  • Previous by thread: How get:int:col:OfCell works?
  • Next by thread: Re: Syntax question
  • Index(es):
    • Date
    • Thread