Error Number: -10006 H-E-L-L-L-P!
Error Number: -10006 H-E-L-L-L-P!
- Subject: Error Number: -10006 H-E-L-L-L-P!
- From: "Wallace, William" <email@hidden>
- Date: Thu, 22 Jan 2004 12:55:19 -0600
- Thread-topic: applescript-users digest, Vol 3 #2361 - 14 msgs
Okay,
Thanks to Axel's input, a lot of this is starting to make sense to me. There is one more thing, however, that I'm just not seeing. For instance:
--main script
property z : 3
global w, x, y
property dPath : (path to desktop) as string
set m to (load script alias (dPath & "script1"))
set p to (load script alias (dPath & "script2"))
set r to (load script alias (dPath & "script3"))
set x to "hi"
set y to {"yesterday"}
r's prepareIt(y)
p's suggestIt()
display dialog (z as string) --> 4
display dialog x --> howyadoin
display dialog w --> w is undefined
--loaded script1
to doIt()
try
set my parent's z to 4
set my parent's x to "howyadoin"
set my parent's w to (item 1 of my parent's y)
on error errMsg number errNum
display dialog "Error! " & errNum & return & errMsg
end try
end doIt
--loaded script2
to suggestIt()
tell my parent's m to doIt()
end suggestIt
--loaded script3
to prepareIt(theDingus)
set item 1 of theDingus to current date
end prepareIt
What I don't understand is why script1 throws a -10006 error (errAEWriteDenied) when trying to set the value of w to item 1 of y. The dialog boxes at the end of the main script show that the value of z has been changed to 4, the value of x has been changed to "howyadoin", but w is, of course, undefined because of the error -10006. Why can't script1 set the value of w? Furthermore, If I change the main script to initialize the value of w to "today" for instance, it all works. Why?
At this point, you might be saying to yourself "well, if you can get it to work, then problem solved..." That isn't good enough! I want to know why it works one way but not the other, so that if something similar crops up in the future I will have a better idea on how to fix it and I won't have to come running to you guys with an endless litany of questions (if that isn't a excellent reason to help me out, then I don't know what is...).
I've been reading everything I can locate that relates to this subject and some crucial bit is eluding me. Please help me to understand - even if you have to whack the side of my head with a ball peen hammer. <melodramatic pleading>I just need and end to this madness and confusion! Don't you see that this is killing me? Please! I beg you. Don't leave me down here with all the wolves and the vipers! Oh, the humanity! Help me! Please, help me!</melodramatic pleading>
-B!ll
_______________________________________________
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.