[Drawkit] From "Bypassing Interface builder"
Uli Kusterer
kusterer at gmail.com
Wed May 14 23:31:35 PDT 2008
Am 15.05.2008 um 03:38 schrieb Graham Cox:
> 1. use IB to set up a DKDrawingView instance. This doesn't need to
> be inside an NSScrollView but it might be better when you get
> further along if it is.
On a side note, if you have a standalone DKDrawingView, you can
select it and choose Make Subview of -> Scroll View in IB to wrap it
in a scroll view after the fact.
> add a menu (call it "Tools" say) to the menu bar and name each item
> to be the same as the tool's name. These are:
>
> (...)
>
> You are not required to add all of them - just any you want. Case
> and spaces matter. Then add the action method
> selectDrawingToolByName: to first responder. Connect each menu item
> to first responder with this action method.
Another side note: This is a neat trick for testing, but of course
unsuitable for a shipping product, particularly if you plan to have
localized menus.
>
Still, it's typical 'Graham Design': Provide quick, elegant and
simple hooks so everything works out of the box.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
More information about the Drawkit
mailing list