#712: Feature Request: Add Support for C-Level Blocks -------------------------------+-------------------------------------------- Reporter: cwdinfo@… | Owner: lsansonetti@… Type: enhancement | Status: new Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Keywords: block -------------------------------+-------------------------------------------- Comment(by dev@…): I think this would read well: {{{ open_panel.beginSheetModalForWindow @main_window, completionHandler: do |arg| puts "Hello, open file and user arg is #{arg}" end }}} It's currently invalid syntax. I haven't thought much about the possible conflicts or technical viability. Along with it, it would be great if we could define methods taking blocks and they could be called on the ObjC side with C blocks: {{{ def beginSheetModalForWindow(aWindow, completionHandler: &block) # … end }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/712#comment:8> MacRuby <http://macruby.org/>