how to save keyboard shortcuts?
how to save keyboard shortcuts?
- Subject: how to save keyboard shortcuts?
- From: HAMSoft Admin <email@hidden>
- Date: Wed, 25 Jun 2008 11:04:46 -0400
I'm really new at this so please be kind!
I recently learned how to make menu item keyboard shortcuts for my
program. The problem is that on the next launch of the program the
shortcuts are gone, so they are not being automatically saved. Is
there a setting in IB for my menu to enable auto-saving of them or do
I have to do it manually? I'm setting them with something like this:
[menuitem setKeyEquivalentModifierMask:NSControlKeyMask |
NSCommandKeyMask];
[menuitem setKeyEquivalent:@"U"];
If I have to do it manually I'm not sure how. First to get the
modifier keys for a particular menu item I'm using this...
int thekmm = [menuitem keyEquivalentModifierMask];
But I don't understand the returned integer. Plus do I have to create
an array of modifiers and keys for every menu item in my program and
save/restore that on every launch? Thant doesn't make sense, so there
must be an easier way.
Thanks,
Hank
_______________________________________________
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