aboutsummaryrefslogtreecommitdiffstats
path: root/CopyMailto/AppDelegate.m
AgeCommit message (Collapse)Author
2018-09-06Rename the project directory "CopyMailto" -> "Copy Mailto"Teddy Wing
2018-09-05Remove unused `applicationWillTerminate` methodTeddy Wing
2018-09-05Terminate app when email address is copiedTeddy Wing
Once the email is copied, the application has exhausted its usefulness and should just quit as if it were a dialog.
2018-09-05Add a "Copy" button that copies the email address to the clipboardTeddy Wing
Thanks to these references: - https://stackoverflow.com/questions/5686958/set-string-to-pasteboard-copy-paste-in-cocoa-application/5687005#5687005 - https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/PasteboardGuide106/Articles/pbCopying.html
2018-09-05Add label that displays the email address coming from `mailto`Teddy Wing
It starts with `mailto:`, so we remove that with a substring method call.
2018-09-05applicationWillFinishLaunching:: Fix `NSAppleEventManager` registrationTeddy Wing
Set correct event class and ID. I just picked a couple that seemed reasomable but it didn't work to open the app based on the URL handler because of the values I picked. Use the exact example as a reference from before: [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; from Thomas Zoechling (https://stackoverflow.com/users/100848/thomas-zoechling) on Stack Overflow: https://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme/1991162#1991162
2018-09-05AppDelegate: Change `window` property to instance variableTeddy Wing
Got this error: Cannot synthesize weak property because the current deployment target does not support weak references Get rid of the property and replace it with an instance variable to get rid of the error.
2018-09-05Add URL Apple Event handling codeTeddy Wing
This untested code should allow the application to respond to a Launch Services URL to open the application. From Thomas Zoechling (https://stackoverflow.com/users/100848/thomas-zoechling) on Stack Overflow: https://stackoverflow.com/questions/1991072/how-to-handle-with-a-default-url-scheme/1991162#1991162
2018-09-05New Xcode 9.2 (9C40b) projectTeddy Wing