Created
August 6, 2011 16:49
-
-
Save jeremytregunna/1129508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function text-view (frame) | |
| ((NSTextView alloc) initWithFrame: frame)) | |
| (function text-field (frame) | |
| (((NSTextField alloc) initWithFrame: frame) | |
| set: (bezeled:0 editable:0 alignment:NSCenterTextAlignment drawsBackground:0))) | |
| (function alert-box (title message) | |
| (let (alert (NSAlert new)) | |
| (let (t (text-view '(0 0 300 100))) | |
| (alert setAccessoryView: t)) | |
| (alert addButtonWithTitle: "Commit") | |
| (alert addButtonWithTitle: "Cancel") | |
| (alert setMessageText: title) | |
| (alert setInformativeText: message) | |
| (set result (alert runModal)) | |
| (alert release))) | |
| (alert-box "Commit changes?" "There are #{6} staged files to be committed. Would you like to commit them now?") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment