Both cells and controls can have tags in IB, control tag should take precedence

This commit is contained in:
Aparajita Fishman
2012-09-28 16:13:24 -04:00
parent adbc420e0f
commit b443cb806a
3 changed files with 6 additions and 2 deletions
+1
View File
@@ -2907,6 +2907,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
[self _setupToolTipHandlers];
_toolTip = [aCoder decodeObjectForKey:CPViewToolTipKey];
if (_toolTip)
[self _installToolTipEventHandlers];
-2
View File
@@ -269,8 +269,6 @@ var NSButtonIsBorderedMask = 0x00800000,
_highlightsBy = [cell highlightsBy];
_showsStateBy = [cell showsStateBy];
[self setTag:[cell tag]];
return self;
}
+5
View File
@@ -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;