• 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: script object properties: seeking confirmation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: script object properties: seeking confirmation


  • Subject: Re: script object properties: seeking confirmation
  • From: "Serge Belleudy-d'Espinose" <email@hidden>
  • Date: Tue, 5 Mar 2002 11:29:03 +0100

At 15:34 -0800 4/03/02, Bill Hoffman wrote:

script myObject
property name: "fred"
property age: 27
property occupation: ""

on updateObj()
set occupation to "janitor"
set income to 500
end updateObj
end script

when I tell a myObject variable to updateObj(), the "set occupation to 'janitor'" statement is fine, but the "set income to 500' statement will fail with an error, telling me that there is no such property as "income".

Not exactly. The 'set income to 500' line will work but will create income as a variable local to the handler, ie unaccessible by other means. What will fail is if you use, for example, 'tell myObject to get its income'.

If there's a way to do that I'd love to know how, but I'm pretty sure there isn't.

Right, you can't.


Serge
--
\\//\//\// Serge Belleudy-d'Espinose Institut Jacques Monod - Jussieu
// // // http://www.ijm.jussieu.fr/ Universites Paris VI, VII - CNRS
//\//\//\\
_______________________________________________
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.

References: 
 >script object properties: seeking confirmation (From: Bill Hoffman <email@hidden>)

  • Prev by Date: RE: standards for applescript
  • Next by Date: AutoType
  • Previous by thread: script object properties: seeking confirmation
  • Next by thread: Re: script object properties: seeking confirmation
  • Index(es):
    • Date
    • Thread