summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Conchillo FlaquƩ <aconchillo@gmail.com>2022-02-04 21:46:51 -0800
committerAleix Conchillo FlaquƩ <aconchillo@gmail.com>2022-02-04 21:46:51 -0800
commitb5cee42478f53e00c56d7ff0a090ffc518aaf43c (patch)
tree684d7a41d838a8225259504b760cc735970bb2e4
parent80b6775b4fcd78b5e5c1c9140e50d733bccdb4fc (diff)
examples: use symbols for methods
-rw-r--r--examples/choices.gs6
-rw-r--r--examples/spotify-playpause.gs2
-rw-r--r--examples/spotify-song.gs6
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/choices.gs b/examples/choices.gs
index a5ef5c8..502848e 100644
--- a/examples/choices.gs
+++ b/examples/choices.gs
@@ -2,8 +2,8 @@
(define choices #("Bread" "Pudding" "Cake"))
-(define app (js-invoke Application currentApplication))
+(define app (js-invoke Application 'currentApplication))
-(js-set! app includeStandardAdditions #t)
+(js-set! app 'includeStandardAdditions #t)
-(js-invoke app chooseFromList choices)
+(js-invoke app 'chooseFromList choices)
diff --git a/examples/spotify-playpause.gs b/examples/spotify-playpause.gs
index b41a9f7..d1dbe38 100644
--- a/examples/spotify-playpause.gs
+++ b/examples/spotify-playpause.gs
@@ -2,4 +2,4 @@
(define spotify (Application "Spotify"))
-(js-invoke spotify playpause)
+(js-invoke spotify 'playpause)
diff --git a/examples/spotify-song.gs b/examples/spotify-song.gs
index ceb6e71..fdfabcf 100644
--- a/examples/spotify-song.gs
+++ b/examples/spotify-song.gs
@@ -2,8 +2,8 @@
(define spotify (Application "Spotify"))
-(define currentTrack (js-invoke spotify currentTrack))
-(define name (js-invoke currentTrack name))
-(define artist (js-invoke currentTrack artist))
+(define currentTrack (js-invoke spotify 'currentTrack))
+(define name (js-invoke currentTrack 'name))
+(define artist (js-invoke currentTrack 'artist))
(console-log name "by" artist)