sequelpro/sequelpro — pull request #2034 by yefb (2014-12-03 21:48:36+00:00)
Title: Fixing the app crash when trying to export and the file already exists (#2010)

Hi guys!

I faced this error too #2010, so I decided to take a look at it.

The reason why this happens is because of Apple made this method deprecated: https://developer.apple.com/Library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/index.html#//apple_ref/occ/instm/NSAlert/beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo

Which made the app to fail in Yosemite (It should be working fine in previous versions).
So in order to keep backwards compatibility, I decided to keep the previous code, and add a condition to use the new accepted method just in Mavericks and Yosemite (the only versions that support the method that replaces the deprecated one).

I'm open to any feedback, in case you don't like my approach or if you have a better idea :)

Thanks!