开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜