mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-10 12:47:13 +00:00
Both cells and controls can have tags in IB, control tag should take precedence
This commit is contained in:
@@ -2907,6 +2907,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