Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: control object names



On Wed, 20 Sep 2006 09:24:54 -0500, "RJay Hansen" <email@hidden> said:
>Quick question.
>
>If you have two windows w/similar controls, is it a problem to assign
>the same name to a similar control in each window?
>
>For example, the default button on two different windows may be a
>"Save" button. Could you name them both "saveNow" as long as you
>specified which window they were attached to when addressing them (eg.
>button "saveNow" of window "mainWindow")?

Yes, because there is no such thing as "as long as" here. You must *always*
specify which window they are attached to. There is no global thing called
button "saveNow" - such a reference is meaningful only as part of a longer
expression involving the window (because there *is* a global thing called a
window). m.

-- 
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.