Re: What are the elements listed in a dictionary?
Re: What are the elements listed in a dictionary?
- Subject: Re: What are the elements listed in a dictionary?
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 22 Mar 2003 18:08:49 -0800
On 3/22/03 5:01 PM, "Jeffrey Mattox" <email@hidden> wrote:
>
>>
>
>> How can a text field contain a movie view or a progress indicator?
>
>
>
> Not sure which application you're talking about but I presume it's a
>
> database of some kind.
>
>
No, it's the AppleScriptKit.asdictionary, viewable in AppleScript
>
Studio. When you look at that dictionary, each class has a list of
>
elements and properties. For a text field, there are elements "movie
>
view" and "progress indicator," among dozens of others. I don't
>
understand why those things are listed there or what good that
>
information is. A text field has some relationship with a progress
>
indicator? Makes no sense.
As about 6 people have told you by now, objects can have elements - from 0
to as many as you want. It's up to you. Since 'text field' object in ASS has
'movie view' and 'progress indicator' listed as elements in the dictionary,
and you're the one making the text field, it's up to you whether you want to
put any movie views or progress indicators in it, or not. If you don't, then
get every movie view of text field "whatever" of window "main"
will give you the answer
{}
because there are none. ASS, unlike every other application we deal with
here, has not yet implemented
make new [someElement] at [someObject]
for very many of its objects. If you want that text field to have a movie
view or progress indicator, you'll have to make one for it in Interface
Builder. (Yes, this topic properly belongs on the AS Studio list. people on
this list don't deal with unscriptable objects or Interface Builder.) Then
link it up to your script by the usual ways: naming it, clicking an event
handler for it.
It sounds like you don't want any of these anyway, So you can forget about
elements in ASS if you haven't set them up in IB.
For your intents and purposes, the main difference is that every object
_does_ have every property listed for it in the dictionary, and you can log
its value (which might be "" if it's a text value or maybe even 'missing
value' although that's not too likely - it usually has some value. But it
will only have 1 or more of the listed elements if you created any for it or
it happens to come with some built in. (E.g. 'a matrix', like a pair of
radio buttons, always comes with at least two 'cells' built in.) Otherwise
it will have {}, none.
>
>
Should I be asking about this on the ASS list? (There's nobody home
>
there now anyway -- I think they are all watching the war on CNN :-)
--
Paul Berkowitz
_______________________________________________
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.