
Untitled
By: a guest on
May 8th, 2012 | syntax:
None | size: 0.69 KB | hits: 17 | expires: Never
(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?")