[self.guardEscapedView setFrameOrigin:NSZeroPoint];
[self.view addSubview:self.guardEscapedView];
- [self.slot00Field bind:@"slotItemID"
- toObject:self.shipController
- withKeyPath:@"selection.slot_0"
- options:nil];
- [self.slot01Field bind:@"slotItemID"
- toObject:self.shipController
- withKeyPath:@"selection.slot_1"
- options:nil];
- [self.slot02Field bind:@"slotItemID"
- toObject:self.shipController
- withKeyPath:@"selection.slot_2"
- options:nil];
- [self.slot03Field bind:@"slotItemID"
- toObject:self.shipController
- withKeyPath:@"selection.slot_3"
- options:nil];
}
- (NSManagedObjectContext *)managedObjectContext
@interface HMSlotItemLevelView : NSTextField
-@property (nonatomic, strong) NSNumber *slotItemID;
-
@end
@interface HMSlotItemLevelView ()
+@property (nonatomic, strong) NSNumber *slotItemID;
+
@property (strong) NSObjectController *slotItemController;
@property (nonatomic, strong) NSNumber *slotItemLevel;
#pragma mark - property
+- (void)setObjectValue:(id)objectValue
+{
+ NSValueTransformer *f = [NSValueTransformer valueTransformerForName:@"HMSlotitemNameTransformer"];
+ NSString *name = [f transformedValue:objectValue];
+ [super setObjectValue:name];
+ [self setSlotItemID:objectValue];
+}
+
- (void)fetchSlotItem
{
self.slotItemController.content = nil;
<binding destination="LyA-xZ-gxq" name="value" keyPath="selection.slot_0" id="4X3-Y8-nMp">
<dictionary key="options">
<string key="NSNoSelectionPlaceholder">-</string>
- <string key="NSValueTransformerName">HMSlotitemNameTransformer</string>
</dictionary>
</binding>
</connections>
<binding destination="LyA-xZ-gxq" name="value" keyPath="selection.slot_1" id="0io-F0-oA1">
<dictionary key="options">
<string key="NSNoSelectionPlaceholder">-</string>
- <string key="NSValueTransformerName">HMSlotitemNameTransformer</string>
</dictionary>
</binding>
</connections>
<binding destination="LyA-xZ-gxq" name="value" keyPath="selection.slot_2" id="n8h-wP-F5a">
<dictionary key="options">
<string key="NSNoSelectionPlaceholder">-</string>
- <string key="NSValueTransformerName">HMSlotitemNameTransformer</string>
</dictionary>
</binding>
</connections>
<binding destination="LyA-xZ-gxq" name="value" keyPath="selection.slot_3" id="w0M-jX-f3G">
<dictionary key="options">
<string key="NSNoSelectionPlaceholder">-</string>
- <string key="NSValueTransformerName">HMSlotitemNameTransformer</string>
</dictionary>
</binding>
</connections>