diff options
author | Just van Rossum <just@lettererror.com> | 1999-02-15 00:04:05 (GMT) |
---|---|---|
committer | Just van Rossum <just@lettererror.com> | 1999-02-15 00:04:05 (GMT) |
commit | cdcc0f0c3c0daac2cd263c36d9b11564e531bbb3 (patch) | |
tree | fcdbdaaccbd82fd8a961559971c1f4ae566826ad | |
parent | 3b8052685c87e6564a3a4c37954ac2d96fcd6478 (diff) | |
download | cpython-cdcc0f0c3c0daac2cd263c36d9b11564e531bbb3.zip cpython-cdcc0f0c3c0daac2cd263c36d9b11564e531bbb3.tar.gz cpython-cdcc0f0c3c0daac2cd263c36d9b11564e531bbb3.tar.bz2 |
AskPassword(): added reference to the module doc string; added support for autoKey events. --jvr
-rw-r--r-- | Mac/Lib/EasyDialogs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Mac/Lib/EasyDialogs.py b/Mac/Lib/EasyDialogs.py index d1bf420..7379ee8 100644 --- a/Mac/Lib/EasyDialogs.py +++ b/Mac/Lib/EasyDialogs.py @@ -2,6 +2,7 @@ Message(msg) -- display a message and an OK button. AskString(prompt, default) -- ask for a string, display OK and Cancel buttons. +AskPassword(prompt, default) -- like AskString(), but shows text as bullets. AskYesNoCancel(question, default) -- display a question and Yes, No and Cancel buttons. bar = Progress(label, maxvalue) -- Display a progress bar bar.set(value) -- Set value @@ -116,12 +117,12 @@ def AskPassword(prompt, default='', id=257): string = default oldschedparams = MacOS.SchedParams(0,0) while 1: - ready,ev = Evt.WaitNextEvent( -1, 6 ) + ready,ev = Evt.WaitNextEvent(Events.everyEvent, 6) if not ready: continue what,msg,when,where,mod = ev if what == 0 : Dlg.DialogSelect(ev) # for blinking caret elif Dlg.IsDialogEvent(ev): - if what == Events.keyDown: + if what in (Events.keyDown, Events.autoKey): charcode = msg & Events.charCodeMask if ( mod & Events.cmdKey ): MacOS.SysBeep() |