On 11/5/2000 2:55 AM, "Bill Cheeseman" <[EMAIL PROTECTED]> wrote:

> on 11/4/00 11:40 PM, Dan Crevier at [EMAIL PROTECTED] wrote:
> 
>> On 11/3/2000 11:32 AM, "Bill Cheeseman" <[EMAIL PROTECTED]> wrote:
>> 
>>> And there's something wrong with categories. A contact's Category and Links
>>> properties both return lists, yet you have to jump through an extra hoop or
>>> two to get at the Category list (for example, in some contexts I have to
>>> refer to "its category" while I don't have to do that for Links in the same
>>> context).
>> 
>> Can you give an example?  I know that whose clauses are broken, but what
>> else isn't behaving as you'd expect.
> 
> tell application "Microsoft Entourage"
>   tell contact 1
>       set myCategories to category --> category
>       -- set aCategory to item 1 of myCategories --> error:Can't get item
> 1 of category
>       set myCategories to category of it --> {category id 6 of application
> "Microsoft Entourage"}
>       set aCategory to item 1 of result --> category id 6 of application
> "Microsoft Entourage"
>       name of aCategory --> "Family"
>   end tell
> end tell
> 
> You don't have to use "of it" when you run the same script to get links of
> contact 1.

Ahh.  The problem is that category is both the name of a class and the name
of a property, and this confuses AppleScript sometimes.  Maybe I should have
chosen a different name for the property to get around this problem.

Dan


-- 
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives: 
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to