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 - Allow modifying SDLAppDelegate behaviour
Summary: Allow modifying SDLAppDelegate behaviour
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: don't know
Hardware: All Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-14 10:03 UTC by Pallav Nawani
Modified: 2020-04-26 22:30 UTC (History)
1 user (show)

See Also:


Attachments
The Proposed new cocoa header file (1.29 KB, text/plain)
2013-11-14 10:03 UTC, Pallav Nawani
Details
Diff of SDL_cocoaevents.m (1013 bytes, patch)
2013-11-14 10:04 UTC, Pallav Nawani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.