Mailing Lists: Apple Mailing Lists

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

Can't read anything in a second window object of the "on will open" handler




Hi All,


After switching to Xcode 3.0, I suddenly had problem with my application that worked with the old version of Xcode.


In my "will open" handler, I have these code snippets:


on will open theObject

try

set objectname to name of theObject as Unicode text

--no problem reading codes in window "main"

if objectname is"main"then

tell window"main"

--codes inside this tell block are read perfectly; no problem

end tell

end if


if objectname is "genPrefs" then

--display dialog "I am inside this if block (this line is not even read at all)

tell window "genPrefs"

--it follows that the codes inside this tell block aren't read either

end tell

end if

end try

end will open


Is there any particular reason why the codes in second "if-end if" block above can't be accessed? Note: The object "genPrefs" is a preference window that contains tab view and tab view items but the most immediate problem obviously is reading the first line (display dialog) in the block. I put that line simply for test.


Would appreciate any lead on the above problem.


Many thanks.


Romy Opena





Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
 _______________________________________________
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.