I tried the code you linked to, in my NSDocument subclass which has a toolbar:
Code:
- (void)systemTintChangedNotification:(NSNotification *)notification;
{
NSString *newDocImage;
if ([NSColor currentControlTint] == NSGraphiteControlTint)
newDocImage=@"NewDocGraphite";
else
newDocImage=@"NewDocAqua";
}
I then changed my New toolbar item image to [NSImage imageNamed:newDocImage] and tried to build, I realized it couldn't use newDocImage outside of
Code:
- (void)systemTintChangedNotification:(NSNotification *)notification;
So I put NSString *newDocImage; in my header and built. Before it could open I got a SigBus 10 then crashing. Any ideas?