I’d like to live prototype GUIs with Macruby. Like creating a window, placing some views in it, etc.. Is that possible?
I’d like to live prototype GUIs with Macruby. Like creating a window, placing some
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes! I just figured this out myself, so I thought I’d share (even though this is an old question). I’m assuming you have MacRuby installed (I’m using 0.11).
Install HotConsole. HotConsole is an IRB-like thing that runs MacRuby code. The nice thing is that it is multithreaded, which means the HotCocoa app doesn’t block the console. To install just:
You can then drag the HotConsole.app to your /Applications folder.
In HotConsole, you can store a HotCocoa window in a variable and then play around with it. For example, in HotConsole.app (make sure you use alt-Enter to go to a new line, else you will run what you’ve typed so far):
You should see a nice Cocoa window pop up with a label that says ‘Hello’. Now for the fun part. In HotConsole.app, you can now type:
HotConsole is pretty crashy for me, but I’m using a not-yet-released version of MacRuby to build/run it, so I don’t know if that makes a difference.