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 t开发者_JAVA百科he 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")
精彩评论