We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2239

Summary: Allow modifying SDLAppDelegate behaviour
Product: SDL Reporter: Pallav Nawani <pallavnawani>
Component: videoAssignee: Sam Lantinga <slouken>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: jonathan
Version: don't know   
Hardware: All   
OS: Mac OS X (All)   
Attachments: The Proposed new cocoa header file
Diff of SDL_cocoaevents.m

Description Pallav Nawani 2013-11-14 10:03:31 UTC
Created attachment 1442 [details]
The Proposed new cocoa header file

Currently, SDLAppDelegate for the Mac is defined/declared in SDL_cocoaevents.m. Because of this, it is not possible to, for example, add a category to the AppDelegate.

For example, to verify Mac App Store receipts, Apple Recommends that the application check the receipt in applicationWillFinishLaunching delegate, and exit with a code of 173 if the receipt is not found.

The attached patch moves the declaration to a header file. The header file can now be included and the delegate added via a category.
Comment 1 Pallav Nawani 2013-11-14 10:04:24 UTC
Created attachment 1443 [details]
Diff of SDL_cocoaevents.m
Comment 2 jonathan 2020-04-26 22:30:47 UTC
I recommend adding this patch; with the closing of bug 4877 (where a menu NIB can now be specified), it seems that menu items in a NIB can now interact with an SDL app by adding a category to the SDLAppDelegate (in order to define functions that can send userevents), which this patch will allow to be done.