[MacRuby-devel] Framework callbacks in macirb

Barry Walker bwalker at quantumparametrics.com
Thu Feb 5 11:54:43 PST 2009


Laurent,

Neither macirb or macruby start the CF/Cocoa runloop for you by
>
default [1], so you will have to start it by yourself. You can call
>
NSApplication.sharedApplication.run or NSRunLoop.currentRunLoop.run.
>

> If you do this from macirb it will block as expected and you won't be
>
able to evaluate expressions. I would then recommend using an irb-like
>
Cocoa app that already uses the runloop under the covers (like
> http://github.com/vincentisambart/hotconsole/tree/master
>
 for example).
>

Thank you for the quick response.  Using these functions I can see that the
callback does execute after the run loop is started, but as you mentioned
macirb won't respond afterward and the MacRuby script execution halts.  So I
know I'm on the right path, but not there yet.
I downloaded hotconsole, but can't seem to get it raked / built / installed.
 I can't find any install instructions.  There is a mention that you need
the latest branch, so I grabbed the testing branch and built it, but still
no luck with hotconsole.

I'm definitely looking forward to trying the run loop functionality in the
next MacRuby release.  I'll be monitoring the mail list for any mention of
its inclusion in the testing branch.

Regards,
Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090205/e2e3d6d0/attachment.html>


More information about the MacRuby-devel mailing list