Sep 21, 2013 12:02 AM
Why does this code crash when compiled with Apple LLVM, but not in GCC?
I'm trying to get this code
compiling under Apple LLVM in Xcode 4 or 5. It works when compiled with GCC, but crashes in the mouseDown method when switched to Apple LLVM on line 198:
NSRect knobRect = _AFSwitchControlKnobRectForInsetBackground(slotRect, _offset);
Because _offset is not set. It's suppose to be set in the bind method with this line:
[self setOffset:(CGFloat)[self state]];
But it appears that nothing is being set under LLVM for some reason. My binding call looks like:
[control bind:NSValueBinding toObject:self withKeyPath:@"isToggleSwitchOn" options:nil];
Any ideas why the control's state is not returning anything under LLVM? Thanks!
|All times are GMT -4. The time now is 11:24 PM.
Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO