D/Objective-C 64bit

Christian Schneider via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Nov 5 01:08:01 PST 2014


> What happens if you declare "doubleClickAction" like this:
>
> void doubleClickAction(NSTableView sender) { ... }
>
> That will probably require a cast when passing the selector to 
> "setDoubleAction".

Hi Jacob

This just "delegates" the "problem" to another place. The
target/action paradigm in Cocoa programming gets a lot from the
fact that any object can be the sender of an action. In this
particular case I'd even prefer the conditional if the sender
"is" the local table view member var, which then basically has
the same effect as what you suggested above.

I think the best thing will be to fix the interface-to-class
casts in the compiler, as Michel suggests above.

Thanks again
Christian


More information about the Digitalmars-d-announce mailing list