Skip to content

Instantly share code, notes, and snippets.

@julianburr
Last active April 20, 2017 09:55
Show Gist options
  • Save julianburr/5e55dfc0bf84d1486f89aaee73f1f1ce to your computer and use it in GitHub Desktop.
Save julianburr/5e55dfc0bf84d1486f89aaee73f1f1ce to your computer and use it in GitHub Desktop.
Medium - Example showing the different syntax options in cocoascript
// Dot syntax
var openPanel = NSOpenPanel.openPanel();
openPanel.setTitle('Hello World');
openPanel.runModal();
// Bracket syntax
var openPanel = [NSOpenPanel openPanel]
[openPanel setTitle:'Hello World']
[openPanel runModal]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment