Re: Display dialog Return - Bug or Feature?
Re: Display dialog Return - Bug or Feature?
- Subject: Re: Display dialog Return - Bug or Feature?
- From: Bill Briggs <email@hidden>
- Date: Mon, 12 Aug 2002 08:12:21 -0300
Well, your code that sets the *default answer* with returns included
is not a script that considers the same thing Paul described in his
post. And the previous comment still stands. It's NOT the same
behaviour in OS X and OS 9. You're not the only one with both systems
running, and unless you're telling me that Display Dialog works
differently on this side of the pond, I'm not buying it.
If you run this in OS 9
display dialog "write something" default answer "text here" buttons
{"yes", "no", "maybe"}
and then when the dialog pops up, type some text and press enter,
precisely nothing happens. The dialog persists, and the text in the
window stays put. The "return" doesn't become part of the text
entered.
However, if you duplicate the test in X is behaves as Paul describes.
The behaviours in X and 9 are different. On this OS 9 Mac you just
can't enter multi-para text. And how might one do that in a dialog
that DID have a default button? If your machine works differently,
then there are three pre-X Macs here that are doing things
differently. I don't think they are all hosed.
- web
At 10:12 AM +0100 12/08/02, John Delacour wrote:
At 5:47 pm -0700 11/8/02, Paul Berkowitz wrote:
Has this always been around, or is it a new kink (feature of bug?) in OS X?
It's a feature, not a bug and it's always been like that, in spite of
what Bill says. You're not actually suggesting anyone's looked at
revising the DD osax in the past ten years are you? :-) I've just
tried the script below in both X and 9 and there is absolutely no
difference. When there is no default buttton, the return key behaves
just as it would in any edit field and it's been like since system 7.
How else would it be possible to give an answer of more than one
line, as is often needed? The DD dialog also allows up to 255
characters in the prompt and this will wrap (unlike choose from
list), so you have plenty of scope. A long line in the editing field
will wrap, so the only way to force the window wider is to add text
to buttons.
(* Users of MacSoup etc will need to unify the long line bewlow *)
set r to return
set s to (ASCII character 202) & r
set btns to {"Need a wide window", "Cancel", "OK"}
set p to r & "Click the _LEFT_ARROW_ to DESELECT
the text; then edit your answer and
click 'OK'"
set a to "a
b
c
" & r
--One line to END
tell me to set dd to display dialog p default answer (s & a) buttons
btns with icon 128
--END
-- Then parse the answer as required
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.