Cocoa's return parameters

Well, it’s the first time I am confronted to this problem. By now I’ve only set Cocoa’s variables, or got return values of functions.

In this call, I have two return parameters:

  • (BOOL)getRow:(NSInteger *)row column:(NSInteger *)column ofCell:(NSCell *)aCell

what am I supposed to send? If I send:

        set b to myMatrix's getRow_column_ofCell_(r1, c1, myCell)

I get an error “the variable r1 is not defined”. If I send r1 as property, it doesn’t work – in fact, XCode freezes!

Shall I create two NSNumbers for r1 and c1 before the call?

Thanks!

Have a look at pages 143-144 of my book. You pass the keyword reference for the two NSInteger * arguments, and get back a list. As in:

set {b, r1, c1} to myMatrix's getRow_column_ofCell_(reference, reference, myCell)

pages 143-144 of my book

Oops-- sorry. Bad student. :confused: