On 16/1/01 5:39 pm, "Paul Berkowitz" <[EMAIL PROTECTED]> wrote:

> On 1/16/01 8:28 AM, "Barry Wainwright" <[EMAIL PROTECTED]>
> wrote:
> 
>> PS:
>> 
>> I wanted to ask why this line wouldn¹t work:
>> 
>> set (item 1 of theContact)'s {business address, Home Address} to
>> theAddresses
>> 
>> I had to break it up into two separate assignments.
>> 
>> Any clues?
> 
> Your parentheses don't make good sense here. This should work fine (assuming
> that the variable theAddresses is already defined properly as a postal
> address record):
> 
>   set item 1 of theContact's {business address, Home Address} to
> theAddresses
> 
> 
> or even:
> 
>   set item 1 of (theContact's {business address, Home Address}) to
> theAddresses
> 
> 
> There's no (item 1 of theContact).  theContact doesn't have items since it's
> not a list - at least no contact I know is a list. I'm presuming that the
> variable theContact represents a single contact in Entourage, yes?

Yes. No. Maybe. 

>From the script I posted earlier, 'theContact' is the value returned by 'the
selection' which in the case of the address book returns a list. If only one
contact is selected, the list contains only one item, but it's still a list.
I could have converted the list to a single contact (after checking there
was only one), but I'm lazy!

Likewise, theAddresses is a list of two items returned by the line:

set theAddresses to {home address, business address} of item 1 of theContact

So, I can normally say 'set {a,b} to {x,y} but I can't do it with the
contacts addresses. I'll play a little more and see where the problem lies.

-- 
=Barry Wainwright=
<http://homepage.mac.com/barryw>

Common Sense is the best distributed commodity in the world, for every man
is convinced that he is well supplied with it. -- René Descartes, 1637


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

Reply via email to