-
Notifications
You must be signed in to change notification settings - Fork 648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot use _Cfunc_objc_getClass(cclass) (type C.Class) as type C.id #5
Comments
A local change I just made (implementing the handled return of AreaHandler.Mouse()) breaks darwin/386 and at this point I'm mostly convinced writing portable code with the Objective-C runtime directly is impossible. I'm going to investigate the possibility of switching to using Objective-C directly and do that today; this may require having to rewrite the types in Objective-C directly. I'm not sure how this will affect the other use of objc_getClass() (to get classes for making instances). In the meantime, you can fix your immediate problem locally with
|
That change doesn't fix the build for me (10.9.2 also). I get
|
Yes. I have tried to convert C.Class to C.id and get the same result with nf. Clearly it's unable to change C.Class to to C.id directly(Maybe just cannot do that convert just under OSX 10.9.2). |
I see, hm... I'm in the process of doing the Objective-C conversion; hopefully by tonight or tomorrow I'll have pushed everything and we can try again. This conversion will get rid of that C.objc_getClass() call (or anything working with Class directly). |
Conversion finished. Does it work now? |
Great! It works now. BTW, there is still a warning when building the package, but it seems not a serious problem. github.com/andlabs/uiDocuments/Go/src/github.com/andlabs/ui/objc_darwin.m:23:9: warning: returning 'const char *' from a function with result type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] |
Right; I'll take care of that soon, as well as any other warnings that may come up when -Wall -Wextra are added. Thanks! |
Build failure on OSX 10.9.2
github.com/andlabs/ui
Documents/Go/src/github.com/andlabs/ui/objc_darwin.go:21: cannot use _Cfunc_objc_getClass(cclass) (type C.Class) as type C.id in return argument
The text was updated successfully, but these errors were encountered: