mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Attempt to fix issue with setState: on NSSwitch.
This commit is contained in:
parent
23ad6ba6c8
commit
d4b7a0c76d
1 changed files with 10 additions and 0 deletions
|
@ -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"] &&
|
||||
|
|
Loading…
Reference in a new issue