• 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: Class/Properties syntax baffles me
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class/Properties syntax baffles me


  • Subject: Re: Class/Properties syntax baffles me
  • From: Arthur J Knapp <email@hidden>
  • Date: Mon, 06 May 2002 12:47:22 -0400

> Date: Sun, 5 May 2002 11:56:44 -0600
> From: Doug McNutt <email@hidden>
> Subject: Re: Class/Properties syntax baffles me

> It never crossed my mind that a temporary intermediate variable would be
> required. Does anybody know why AppleScript differs from FORTRAN or C in this
> regard?

;-)

This is actually an odd question. Fortran and C are true machine
compiled languages in which the programmer is responsible for memory
management, creating data structures, the kitchen sink, etc. AppleScript
is a language for manipulating AppleEvents. It uses complex parsing
techniques to "map" English-like terminology, (including terms that have
whitespace in them), to 4-character codes which are then sent off to the
AppleEvent Manager.


> At 18:26 +0100 5/5/02, Simon Topliss wrote:

>> tell application "Interarchy 5.0.1"
>> set fwr to frontwindowrecord
>> name of fwr
>> end tell

>> name of frontwindowrecord

In the above case, I suspect that AppleScript simply tried to send
a single AppleEvent message to the application while, in point of
fact, this is two separate operations: A command to return a data
structure, and a reference command to extract a part of that
data structure. This would be different if frontwindowrecord was
implemented by the application as an actual object of it's object
model, but instead, it is a record-returning command.


Learning AppleScript is more like learning magical incantations than
it is like learning a programming language. ;-)



{ Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
<mailto:email@hidden>
try
<http://maccentral.macworld.com/columns/briggs.shtml>
on error number -128
end try
}
_______________________________________________
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.

  • Prev by Date: RE: Type/Creator again...
  • Next by Date: Re: Choose from list
  • Previous by thread: Re: Class/Properties syntax baffles me
  • Next by thread: Choose from list
  • Index(es):
    • Date
    • Thread