mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-19 21:19:24 +00:00
Fix tag reading from IB
Both controls and cells can have tags in IB, but Cappuccino has no cells. If the control has a tag, that takes precedence. Tag reading was moved to NSControl from NSView, since NSView does not have a tag in Cocoa.
This commit is contained in:
1 parent
90d52a8bb4
commit
8ff2a32b47
3 files changed
+6
-2
No files matched your search
@@ -3072,6 +3072,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
|
||||
[self _setupToolTipHandlers];
|
||||
_toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey];
|
||||
|
||||
if (_toolTip)
|
||||
[self _installToolTipEventHandlers];
|
||||
|
||||
|
||||
@@ -269,8 +269,6 @@ var NSButtonIsBorderedMask = 0x00800000,
|
||||
_highlightsBy = [cell highlightsBy];
|
||||
_showsStateBy = [cell showsStateBy];
|
||||
|
||||
[self setTag:[cell tag]];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,6 +56,11 @@
|
||||
[self setLineBreakMode:[cell lineBreakMode]];
|
||||
|
||||
[self setFormatter:[cell formatter]];
|
||||
|
||||
// In IB, both cells and controls can have tags.
|
||||
// If the control has a tag, that takes precedence.
|
||||
if ([aCoder containsValueForKey:@"NSTag"])
|
||||
[self setTag:[aCoder decodeIntForKey:@"NSTag"]];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user