On Thursday, 31 December 2015 at 03:43:58 UTC, Jeremie Pelletier wrote:

This is from the class method call to NSProcessInfo.processInfo.

I've tried without the selector but get a linker error on __D4main13NSProcessInfo11processInfoYZC4main13NSProcessInfo.

I'm not sure if it is a bug or if I'm not using it correctly so I'm asking here before opening a bug report :)

D doesn't support Objective-C classes methods yet. But as a workaround you can look how it's done with the "alloc" method in the documentation [1]. Declare the method as a non-static method but use the result from "objc_lookUpClass" as the receiver (object).

[1] http://dlang.org/spec/objc_interface.html#usage-example

Reply via email to