objective c - Bold + Italic Shortcuts in Document-Based Applications -
i've been reading using first responder proxy object, , dragging connections buttons in order create usable actions (align left, right, etc). however, default, first responder doesn't contain bold , italic actions. tried adding these actions opening menu.xib , dragging (font > bold) menu item first responder , setting boldit function (custom) overwrites existing action (font manager: addtrait). there way efficiently add bold/italic button on document.xib? seems lot of work common. new obj-c best, zach in menu xib, there object (the bold menu item), tag 2, , action connected -addfonttrait: method of nsfontmanager instance. you need same thing in document xib. add nsfontmanager object; create bold button; set tag 2; , connect action -addfonttrait on nsfontmanager.