mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-22 16:18:53 +00:00
Both cells and controls can have tags in IB, control tag should take precedence
This commit is contained in:
1 parent
adbc420e0f
commit
b443cb806a
3 files changed
+6
-2
No files matched your search
@@ -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