[MacRuby] #1322: Xcode 4.1/4.2
MacRuby
ruby-noreply at macosforge.org
Fri Jul 22 17:22:12 PDT 2011
#1322: Xcode 4.1/4.2
----------------------------------------+-----------------------------------
Reporter: d.dagostino@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------------+-----------------------------------
Comment(by paolo.bosetti@…):
@rolando: yes I remember that the old InterfaceBuilder offered the
possibility to manually add outlets and actions, but I can't figure out
how to do that on Xcode 4.2... apart of adding them programmatically, of
course.
I actually just found a workaround:
1. create an Objective-C class (.m/.h files) with the same name of the
ruby class of your controller. MacRuby will override the methods you
define here.
2. open your nib viewer, and using the assistant open side by side the
Obj-C interface file.
3. right-drag from your controller to the interface file (yes into the
code view): when you release the mouse, a popover will appear asking you
what do you want to create (outlet or action) and what has to be its name.
4. for actions, you can safely leave the implementation empty.
5. now in the NIB viewer you can connect your actions/outlet as usual.
Since the ruby classes get parsed AFTER the ObjC ones, the action methods
you will define in ruby will override the (empty) methods you created
above.
Let me know if it works for you. The good of this workaround is that when
the bug will be solved, you will only have to delete the ObjC files. Or
you can keep them and implement there some specific task, of course.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1322#comment:9>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list