Re: script object properties: seeking confirmation
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.