-
-
Save zacharycarter/e14e647ab6cb818675326d137d6f94f0 to your computer and use it in GitHub Desktop.
This file contains 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
{.passL: "-framework Foundation".} | |
{.passL: "-framework AppKit".} | |
type NSAlert {.importobjc: "NSAlert*", header: "<AppKit/AppKit.h>", | |
incompleteStruct.} = object | |
proc messageBox*() = | |
{.emit: """ | |
NSAlert *alert = [[NSAlert alloc] init]; | |
[alert setMessageText:@"Message text."]; | |
[alert setInformativeText:@"Informative text."]; | |
[alert addButtonWithTitle:@"Excellent"]; | |
[alert runModal]; | |
""".} | |
messageBox() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment