D/Objective-C 64bit

Christian Schneider via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Nov 4 00:13:21 PST 2014


>>
>> I would expect to be using an ObjcObject instead of an 
>> NSObject here,
>> but this does not compile. The signature of the target action 
>> seems to
>> be irrelevant, it may have no or more parameters. I guess this 
>> is just
>> ok and the expected behavior.
>
> Hmm, that sounds strange. What exact errors do you get?


source/appdelegate.d(47): Error: function
appkit.tableview.NSTableView.setDoubleAction (objc_selector*
aSelector) is not callable using argument types (extern
(Objective-C) void __selector(ObjcObject))

Line 46 & 47:

auto doubleAction = &AppDelegate.doubleClickAction ;
demoTableView.setDoubleAction(doubleAction) ;

Line 80:

void doubleClickAction(ObjcObject sender) {

actually, when line 46 & 47 are like above, it doesn't matter if
I change ObjcObject to NSObject, but I guess my problem here is
how Map the function in tableview.d:

void setDoubleAction(objc.runtime.SEL aSelector)
[setDoubleAction:] ;


> [1] 
> https://github.com/jacob-carlborg/dmd/blob/d-objc/test/runnable/objc/objc_selector.d

I know Dip 43 almost by heart now, but I haven't yet discovered
the tests you wrote. Nice, this will be extremely helpful.

Best!


More information about the Digitalmars-d-announce mailing list