[Drawkit] From "Bypassing Interface builder"

Graham Cox graham.cox at bigpond.com
Thu May 15 00:44:39 PDT 2008


Absolutely - I do *not* advocate this as a "real" interface but it's a  
quick way to make DK select tools without you having to write any code.


G.



On 15 May 2008, at 4:31 pm, Uli Kusterer wrote:

>> 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.



More information about the Drawkit mailing list