Attempt to fix issue with setState: on NSSwitch.

This commit is contained in:
Gregory John Casamento 2020-04-22 17:02:53 -04:00
parent 23ad6ba6c8
commit d4b7a0c76d

View file

@ -2789,6 +2789,16 @@ didStartElement: (NSString*)elementName
[object setHeaderToolTip: [element attributeForKey: @"toolTip"]];
}
// Handle state for NSSwitch
if ([element attributeForKey: @"state"])
{
if ([object respondsToSelector: @selector(setState:)])
{
[object setState: [[element attributeForKey: @"state"] isEqualToString: @"on"] ?
NSControlStateValueOn : NSControlStateValueOff];
}
}
// Process IB runtime attributes for element...
// Ensure we don't process the placeholders...
if ([element elementForKey: @"userDefinedRuntimeAttributes"] &&