A discussion on why you can not use a button to imitate the format menu bar item for toggling bold and italic attributes:


in a nutshell, you use the tag to distinguish between bold (2) and italic (1) traits, but the toggle direction is determined by calling the validateMenuItem method which requires the sender to be a menuItem?