Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 097da0d

Browse files
committed
Documented the fact that the main class now mimicks the OSA "application" class.
1 parent 880be6f commit 097da0d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Doc/mac/scripting.tex

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ \chapter{MacPython OSA Modules \label{scripting}}
3131
import Finder
3232
3333
f = Finder.Finder()
34-
print f.get(Finder.window(1).name)
34+
print f.get(f.window(1).name)
3535
\end{verbatim}
3636

3737
As distributed the Python library includes packages that implement the
@@ -64,10 +64,12 @@ \chapter{MacPython OSA Modules \label{scripting}}
6464
keyword arguments. AppleScript classes are also implemented as Python
6565
classes, as are comparisons and all the other thingies.
6666

67-
Note that in the current release there is no coupling between the main
68-
Python class implementing the verbs and the Python classes implementing
69-
the AppleScript classes. Hence, in the example above we need to use
70-
\code{f.get(Finder.window(1).name)} in stead of the more Pythonic
67+
The main
68+
Python class implementing the verbs also allows access to the properties
69+
and elements declared in the AppleScript class "application". In the
70+
current release that is as far as the object orientation goes, so
71+
in the example above we need to use
72+
\code{f.get(f.window(1).name)} in stead of the more Pythonic
7173
\code{f.window(1).name.get()}.
7274

7375

0 commit comments

Comments
 (0)