我得到了一个“图像井”,我试图通过ApplescriptObjC中的Applescript来填充它。
我的密码就像
script AppDelegate
property parent : class "NSObject"
property myImageView : missing value
set myImage to NSImage's alloc()'s initWithContentsOfFile_("/Users/xxx/Desktop/red.png")
myImageView's setImage_(myImage)
end script但是这个图像从未显示在"myImageView“图像中(它们在xib文件中链接)。
发布于 2014-01-27 17:08:56
只是对这一行做了一点语法修改:
set myImage to current application's NSImage's alloc's initWithContentsOfFile_("/Users/xxx/Desktop/red.png")https://stackoverflow.com/questions/21380827
复制相似问题