开发者

PyObjC giving strange error - [OC_PythonUnicode representations]: unrecognized selector sent to instance 0x258ae2a0

开发者 https://www.devze.com 2023-01-09 18:35 出处:网络
I have this line: NSWorkspace.sharedWorkspace().setIcon_forFile_options_(unicode(icon开发者_开发百科),unicode(target),0)

I have this line:

NSWorkspace.sharedWorkspace().setIcon_forFile_options_(unicode(icon开发者_开发百科),unicode(target),0)

Why does it give that error and how do I fix it?

Thank you.


I misread the documentation. I need to do this:

NSWorkspace.sharedWorkspace().setIcon_forFile_options_(NSImage.alloc().initWithContentsOfFile_(icon),target,0)

Unfortunately the error is what confused me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号