Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ef5cd05c
Kaydet (Commit)
ef5cd05c
authored
Eyl 17, 1996
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Calling Application._quit() is now preferred over raising self.
üst
4cb94545
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
14 additions
and
20 deletions
+14
-20
PICTbrowse.py
Mac/Demo/PICTbrowse/PICTbrowse.py
+1
-1
PICTbrowse2.py
Mac/Demo/PICTbrowse/PICTbrowse2.py
+1
-1
cgi.html
Mac/Demo/cgi.html
+1
-6
example2.html
Mac/Demo/example2.html
+4
-4
InterslipControl-2.py
Mac/Demo/example2/InterslipControl-2.py
+1
-1
imgbrowse.py
Mac/Demo/imgbrowse/imgbrowse.py
+1
-1
textedit.html
Mac/Demo/textedit.html
+1
-2
ped.py
Mac/Demo/textedit/ped.py
+1
-1
htmled.py
Mac/Demo/waste/htmled.py
+1
-1
swed.py
Mac/Demo/waste/swed.py
+1
-1
wed.py
Mac/Demo/waste/wed.py
+1
-1
No files found.
Mac/Demo/PICTbrowse/PICTbrowse.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -47,7 +47,7 @@ class PICTbrowse(FrameWork.Application):
self
.
quititem
=
FrameWork
.
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
quit
(
self
,
*
args
):
raise
self
self
.
_quit
()
def
showPICT
(
self
,
resid
):
w
=
PICTwindow
(
self
)
...
...
Mac/Demo/PICTbrowse/PICTbrowse2.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -51,7 +51,7 @@ class PICTbrowse(FrameWork.Application):
self
.
quititem
=
FrameWork
.
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
quit
(
self
,
*
args
):
raise
self
self
.
_quit
()
def
showPICT
(
self
,
resid
):
w
=
PICTwindow
(
self
)
...
...
Mac/Demo/cgi.html
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -30,11 +30,6 @@ This file contains two classes, <code>MiniApplication</code> and <code>AEServer<
MiniApplication is a tiny replacement for
<code>
FrameWork.Application
</code>
,
suitable if your application does not need windows and such.
<blockquote>
Actually, Framework.Application has a problem for AE Servers,
due to the way it expects to be quit through an exception, and raising an exception
while inside an Apple Event handler is a very bad idea. This will be fixed.
</blockquote>
AEServer is a bit of glue that does part of the appleevent decoding for you. You
call
<code>
installaehandler
</code>
passing it the class and id (4-char strings)
of the event you have a handler for and the handler callback routine. When the
...
...
@@ -45,7 +40,7 @@ suites provide. <p>
You can test AEServer by double-clicking it. It will react to the standard
run/open/print/quit OSA commands. If it is running as a normal python script and you
drag a file onto the interpreter the script will tell you what event i
s
got.
<p>
drag a file onto the interpreter the script will tell you what event i
t
got.
<p>
<h2>
A Minimal CGI script
</h2>
...
...
Mac/Demo/example2.html
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -85,8 +85,8 @@ Next comes the definition of our main class,
menu bar and the main event loop and event dispatching. In the
<CODE>
__init__
</CODE>
routine we first let the base class initialize
itself, then we create our modeless dialog and finally we jump into
the main loop. The main loop continues until
<CODE>
self
</CODE>
is
raised,
which we will do when the user selects "quit". When we create
the main loop. The main loop continues until
we call
<CODE>
self._quit
</CODE>
,
which we will do when the user selects "quit". When we create
the instance of
<CODE>
MyDialog
</CODE>
(which inherits
<CODE>
DialogWindow
</CODE>
, which inherits
<CODE>
Window
</CODE>
) we pass
a reference to the application object, this reference is used to tell
...
...
@@ -97,8 +97,8 @@ clicks. <p>
The
<CODE>
makeusermenus()
</CODE>
method (which is called sometime
during the Application
<CODE>
__init__
</CODE>
routine) creates a File
menu with a Quit command (shortcut command-Q), which will callback to
our quit() method.
<CODE>
Quit()
</CODE>
, in turn,
raises 'self'
which
causes the mainloop to terminate.
<p>
our quit() method.
<CODE>
Quit()
</CODE>
, in turn,
calls
<CODE>
_quit
</CODE>
which
causes the mainloop to terminate
at a convenient time
.
<p>
Application provides a standard about box, but we override this by
providing our own
<CODE>
do_about()
</CODE>
method which shows an about
...
...
Mac/Demo/example2/InterslipControl-2.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -51,7 +51,7 @@ class InterslipControl(FrameWork.Application):
self
.
quititem
=
FrameWork
.
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
quit
(
self
,
*
args
):
raise
self
self
.
_quit
()
def
do_about
(
self
,
*
args
):
f
=
Dlg
.
GetNewDialog
(
ID_ABOUT
,
-
1
)
...
...
Mac/Demo/imgbrowse/imgbrowse.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -81,7 +81,7 @@ class imgbrowse(FrameWork.Application):
self
.
quititem
=
FrameWork
.
MenuItem
(
m
,
"Quit"
,
"Q"
,
self
.
quit
)
def
quit
(
self
,
*
args
):
raise
self
self
.
_quit
()
def
opendoc
(
self
,
*
args
):
fss
,
ok
=
macfs
.
StandardGetFile
()
# Any file type
...
...
Mac/Demo/textedit.html
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -108,8 +108,7 @@ lines. <p>
Oh yes: the
<code>
quit
</code>
callback does a little magic too. It closes all windows, and only if this
succeeds it actually quits. This gives the user a chance to cancel the operation if some files are unsaved.
Quitting itself is also a bit strange: you raise
<code>
self
</code>
to break out of the main loop. This bit
of idiom was invented by Guido, so blame him:-).
<p>
<p>
Lastly, there is the
<code>
idle
</code>
method, called by the Application base class when no event
is available. It is forwarded to the active window, so it can blink the text caret.
<p>
...
...
Mac/Demo/textedit/ped.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -295,7 +295,7 @@ class Ped(Application):
w
.
close
()
if
self
.
_windows
:
return
raise
self
self
.
_quit
()
#
# Edit menu
...
...
Mac/Demo/waste/htmled.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -730,7 +730,7 @@ class Wed(Application):
w
.
close
()
if
self
.
_windows
:
return
raise
self
self
.
_quit
()
#
# Edit menu
...
...
Mac/Demo/waste/swed.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -558,7 +558,7 @@ class Wed(Application):
w
.
close
()
if
self
.
_windows
:
return
raise
self
self
.
_quit
()
#
# Edit menu
...
...
Mac/Demo/waste/wed.py
Dosyayı görüntüle @
ef5cd05c
...
...
@@ -368,7 +368,7 @@ class Wed(Application):
w
.
close
()
if
self
.
_windows
:
return
raise
self
self
.
_quit
()
#
# Edit menu
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment