NSButton and NSEvent
NSButton and NSEvent
- Subject: NSButton and NSEvent
- From: Jeremy Matthews <email@hidden>
- Date: Sat, 27 Feb 2010 08:46:07 -0500
So I have a application that I am getting ready to put some finishing touches on, but there are one or two things I'd like to do differently...er, better.
It is a simple tool (Cocoa Desktop app) with a slew of checkboxes (around 40 in a separate window) that act as parameters on a command. While I show the user-friendly wording "yard work", behind the scenes I actually use parameters like "-lawngeneral" (if that checkbox is selected it does a check and provides the internal naming scheme when it builds the full command). Since the latter are part of the internal logic (and affect other systems), they cannot be changed at this time. But, I would like to be able to give those nsbuttons a second property that does not change depending on selection (so, alternateTitle would not work), just to make life easier when referencing said items. In NSMenu land, someone mentioned using setRepresentedItems, which worked great in my needs there...is there a similar feature for NSButton (specifically checkboxes)?
Also, it would be nice if I could intercept an nsevent that changed their text from the user-friendly version to the internal logic titles - if only for some better understanding by power users (like, holding down the option key at any point in time). I've mucked around with some examples, but it seems like most depend on a a specific method and not silently observing in the background, like clicking on a button.
How would you handle the first request, create a dictionary, or is there another method I missed?
And the second, I'm not even sure..
Any ideas?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden