lib/bean/nstoolbaritem_additions.rb
#
# Shortcut for adding an on click handler to the toolbar item.
#
# The provided block will be provided the sender when executed.
#
# @param blk [Proc] The block to execute on click
# @return [Nil]
Shortcut for adding an on click handler to the toolbar item.
The provided block will be provided the sender when executed.
Shortcut for adding an on click handler to the toolbar item . The provided block will be provided the sender when executed .
def on_click(&blk)
    @on_action = blk
    def self.performAction(sender); @on_action.call(sender); end
    setAction("performAction:")
    setTarget(self)
  end
def on_click ( & blk ) @on_action = blk def self . performAction ( sender ) ; @on_action . call ( sender ) ; end setAction ( "performAction:" ) setTarget ( self ) end
Shortcut for adding an on click handler to the toolbar item.
Shortcut for adding an on click handler to the toolbar item .
None
Nil
blk
The block to execute on click
The block to execute on click