Re: DialogDirector - default item
Re: DialogDirector - default item
- Subject: Re: DialogDirector - default item
- From: JollyRoger <email@hidden>
- Date: Fri, 22 Feb 2002 07:49:05 -0600
On 2/21/2002 8:52 PM, "Romulus Barabas" <email@hidden> wrote:
>
dd install
>
set d to dd make dialog {size:[200, 210], style:movable dialog, contents:[,
>
{class:push button, name:"Done", bounds:[60, 182, 115, 200]}, ,
>
{class:push button, name:"Check", bounds:[130, 182, 185, 200]}, ,
>
{class:text field, bounds:[60, 90, 115, 106], value:""} ,
>
], default item:2}
>
repeat
>
set i to dd interact with user
>
if i = 1 then exit repeat
>
if i = 2 and (dd get value of item 3 of d) is "OK" then dd set default item
>
of d to 1
>
end repeat
>
dd uninstall
I'm surprised you didn't get an error. This line is wrong:
dd set default item of d to 1
You are setting the "default item" property of the dialog /reference/
instead of the dialog /record/. Those are two different things. According
to the dictionary, "default item" is a property of the "dialog" class, not a
dialog reference. It looks like the only way is to change the dialog
template and re-make the dialog.
JR
_______________________________________________
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.