MacRuby & Interface Builder properties

I need some help with getting deeper into MacRuby and XCode, especially the part where I can access various library component properties/methods. I need some kind of reference I guess.

Let me clarify this a bit more. If I add a component from the library, such as a Textview to a form in Interface builder, I can interact with it through my NSObject (linked to my controller). Using attr_accessor and instance variables I can get data by using the getters and setters, like

@mycomponent.stringValue() 

or

@mycomponent.stringValue = "55"

However, I want to be able to set the properties of an imageview (like changing the source of the image), or the url for a webkit view. Can someone point me in the right direction for a reference that reflects MacRuby?

I have found similar topic, but the answers weren't that satisfying. Mostly because of the unfinished state of the MacRuby book, I didn't find the answer to my question.

I hope you can help me! Thanks,


I've solved this through using the Developer Connection reference,

- (void)setImage:(NSImage *)image

which reflects to:

myImageView.setImage("resources/myimage.png")
链接地址: http://www.djcxy.com/p/24404.html

上一篇: 在Interface Builder中删除自动布局(约束)

下一篇: MacRuby和Interface Builder属性