Fixed crash on 10.8 and 10.9 caused by MPToolbarButton

Signed-off-by: michael starke <michael.starke@hicknhack-software.com>
This commit is contained in:
michael starke
2015-10-22 14:25:27 +02:00
parent 83a89b9d1a
commit 4c91a55410
7 changed files with 50 additions and 15 deletions

View File

@@ -7,6 +7,7 @@
//
#import "MPReferenceBuilderViewController.h"
#import "KPKReferenceKeys.h"
@interface MPReferenceBuilderViewController ()
@@ -40,7 +41,7 @@
if(allowCustomAttributes) {
[menu addItemWithTitle:NSLocalizedString(@"CUSTOM_ATTRIBUTE","") action:NULL keyEquivalent:@""];
}
NSArray *keys = @[ @"I", @"T", @"U", @"P", @"A", @"N", @"S" ];
NSArray *keys = @[ kKPKReferenceUUIDKey, kKPKReferenceTitleKey, kKPKReferenceUsernameKey, kKPKReferencePasswordKey, kKPKReferenceURLKey, kKPKReferenceNotesKey, @"S" ];
[menu.itemArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSMenuItem *item = (NSMenuItem *)obj;
NSAssert(keys.count > idx, @"");