Using BGHUDAppKit with MacRuby
This is a short tutorial on how to use BGHUDAppKit together with MacRuby. We assume that you have already installed Xcode 3.1 and MacRuby 0.4.
- Download (or rather checkout) the current version of BGHUDAppKit:
svn checkout http://bghudappkit.googlecode.com/svn/trunk/ bghudappkit
- Open the file
bghudappkit/BGHUDAppKit.xcodeprojin Xcode. - In the source list on the left side, search for the target BGHUDAppKit, right-click it and choose Get Info (or Cmd-I).
- Select the tab Build and search for the option Architectures.

- Change the value of Architectures to 32/64-bit Universal (otherwise you will get a "no matching architecture in universal wrapper" error when launching your MacRuby application).

- Switch back to the project view and build the project (menu Build > Build or Cmd-B).
- After the build is complete, drag the file
BGHUDAppKit.frameworkto the Frameworks group of your MacRuby project. - Select your active target, right-click it and choose Add › New Build Phase › New Copy Files Build Phase.
- Double-click the new "Copy Files" build phase and select Frameworks from the Destination drop down.
- Drag the BGHUDAppKit.framework from the Frameworks group to the newly created build phase.
- Open the file
rb_main.rb, search forframework 'Cocoa'
and add the following line after it:framework 'BGHUDAppKit'
- Build your MacRuby project. It should run normally and raise no errors.
Finally you can access the new HUD controls in Interface Builder and add them to your interfaces, configure their properties, connect them with IBOutlets and IBActions, etc.
Keywords: mac, programming, ruby
Keywords
- blog (1)
- iphone (4)
- mac (4)
- programming (5)
- ruby (6)
- ruby on rails (2)
- snippet (1)
- statistics (1)

Comments