• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: List Problem (I think) Disguised as a GraphicConverter Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List Problem (I think) Disguised as a GraphicConverter Problem


  • Subject: Re: List Problem (I think) Disguised as a GraphicConverter Problem
  • From: Jonathan Levi MD <email@hidden>
  • Date: Wed, 9 Mar 2005 07:04:26 -0500

Thanks to Neil, Michelle, Gil and any others who responded:

I have two open GC windows, "a.pict (RGB)" and
"b.pict (RGB)", a list gcWindowNames consisting
of these two window names, and two ways to get
them sequentially, "repeat with i from 1 to
(count items of gcWindowNames)" and "repeat with
wname in items of gcWindowNames". The first way
works, the second doesn't...

Dereferencing the reference with "gcActivateWindow(contents of wname)" did indeed work. --Jonathan

..When you use the "repeat with <name> in <list>" command, the
successive values of <name> are *references to* the values of the list...

Change the function call to "gcActivateWindow(contents of wname)" and
it should work.

Regards,

	Neil Faiman

Sometimes, you have to use "contents <variable>"  I still don't understand
what the reason is, but I know that if that form of iteration doesn't
work, using content almost always does.

-- Michelle

I just finished reading about this in The Definitive Guide.  As Matt
explains it, the problem is that, in the last case, wname is a
reference.  Nevermind what the log says, the value of wname when you
call the subroutine is an incantation,  something Matt calls "frozen
words", like, "item 1 of gcWindowNames" -- it isn't the item, but a
"reference" to it...

--Gil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Hiding ScriptingAdditions.osax
  • Next by Date: launching services..
  • Previous by thread: Filemaker Communications error
  • Next by thread: launching services..
  • Index(es):
    • Date
    • Thread