Re: [hatari-devel] deprecated in NSAlert |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Am Fri, 1 Aug 2014 16:55:51 +0200
schrieb Miguel Saro <miguel.saro@xxxxxxx>:
> Method NSRunAlertPAnel is deprecated since OSx 10.6. Must be replaced
> by
> alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:
> which is deprecated in OSx 10.9. So I change all in agreement with
> Apple documentation [[NSAlert alloc] init]. Diff below. Miguel
Thanks for the patch ... one part looks a little bit strange, though:
- (IBAction)warmReset:(id)sender
{
- if (NSRunAlertPanel (localize(@"Warm reset"), localize(@"Really reset the emulator?"),
- localize(@"OK"), localize(@"Cancel"), nil) == NSAlertDefaultReturn )
+ if ([NSApp myAlerte:NSInformationalAlertStyle Txt:localize(@"Cold reset!") firstB:localize(@"OK") alternateB:localize(@"Cancel")
+ otherB:nil informativeTxt:localize(@"Really reset the emulator?")] == NSAlertDefaultReturn)
Reset_Warm();
}
- (IBAction)coldReset:(id)sender
{
- if (NSRunAlertPanel (localize(@"Cold reset!"), localize(@"Really reset the emulator?"),
- localize(@"OK"),localize(@"Cancel"), nil) == NSAlertDefaultReturn )
+ if ([NSApp myAlerte:NSInformationalAlertStyle Txt:localize(@"Warm reset") firstB:localize(@"OK") alternateB:localize(@"Cancel")
+ otherB:nil informativeTxt:localize(@"Really reset the emulator?")] == NSAlertDefaultReturn)
Reset_Cold();
}
i.e. in the warmReset action, you've got a text about "Cold reset!"
now, and in the coldReset action, you've got a text about "Warm reset".
Should they be swapped?
Thomas