Dialog Director odd behavior
Dialog Director odd behavior
- Subject: Dialog Director odd behavior
- From: Wim Melis <email@hidden>
- Date: Thu, 3 May 2001 03:31:03 +0200
Hi all,
Using Dialog Director, I'm trying to gray out some items. If you run the
code below and uncheck the checkbox, the item list will indeed get grayed
out.
If you then click OK and run the script again, the checkbox starts off
unchecked and the list *should* start grayed out. But it doesn't.
I've used this graying-out method successfully with several DD items, but
just can't get it to work with a radio group (on OS8.6).
Did I run into a bug? Any suggestions?
Related question: I'm using DD to collect parameters for a droplet that
performs automatic resizing of images using Photopaint. Once 'OK' is hit
and Photopaint starts doing its thing, I can keep the DD window open and
let it inform the user of the progress (ie. how many pictures have been
processed). But I haven't been able to find a way to keep the 'cancel'
button active: I would like to be able to quit the script when that
button is hit, to let Photopaint finish the current picture and then stop
before the next one. Is it possible to do this outside of the 'dd
interact with user' loop?
Thanks,
Wim
----------
-- <cont.> stands for the continuation marker
property theChoice : 2
property theFlag : true
set aDialog to {size:[150, 110], timeout after:60, contents:[ <cont.>
{class:check box, bounds:[20, 10, 200, 30], value:theFlag, name:"Flag"},
<cont.>
{class:radio group, bounds:[100, 10, 210, 30], enabled:theFlag <cont.>
, button offset:[20, 20], value:theChoice, max down:3, contents:{"A",
"B", "C"}}, <cont.>
{class:push button, bounds:[30, 80, 70, 100], name:"OK"}]}
dd install with grayscale
set theDialog to dd make dialog aDialog
repeat
set i to dd interact with user
if i = 3 then
exit repeat
else if i = 1 then
dd set enabled of (item 2 of theDialog) to dd get value of item 1 of
theDialog
end if
end repeat
set theResult to dd get value of every item of theDialog
dd delete theDialog
dd uninstall
set {theFlag, theChoice} to theResult's {item 1, item 2}
----
-----
email (home): email@hidden
email (office): email@hidden
http://www.noorderlicht.com * Noorderlicht photofestival