• 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: Error Number: -10006 H-E-L-L-L-P!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error Number: -10006 H-E-L-L-L-P!


  • Subject: Re: Error Number: -10006 H-E-L-L-L-P!
  • From: "Wallace, William" <email@hidden>
  • Date: Thu, 22 Jan 2004 18:25:18 -0600
  • Thread-topic: Re: Error Number: -10006 H-E-L-L-L-P!

That does seem to make a little more sense. Hmmm... my error definition resources have misled me. So what is it about item 1 of y that prevents it from being set in a container? or is that error description misleading? From what I can tell it is w that has the problem, not item 1 of y. Because if I initialize w in the main script to any arbitrary value (even null), it does work (item 1 of y is therefore not the problem). But I still don't see _exactly_why_ my previous example doesn't work but this does:

global w, x
set x to {"a", "b", "c"}

doIt()

on doIt()
set w to item 1 of x
end doIt
display dialog w --> shows w as containing the string "a"

In this example w is also undefined when the handler doIt() tries to set its value. The only difference I can see between this and my previous example is that the handler doIt() previously resided in a loaded script object but now it resides within the body of the main script. I can accept that this is just the way it works, but I really would like to understand the logic behind it. And I'm just not seeing it. Does anybody have a nice illustrative metaphor they can whip out?

-B!ll

>At 12:55 PM -0600 22/01/04, Wallace, William wrote:
>>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.
>
>Maybe you can make more sense out of this rather than the errAEWriteDenied:
>
>errOSACantAssign = -10006, /* Signaled when an object cannot be set in a container.*/
>
>(Found with Smile's "Get error information").
>
>Emmanuel
_______________________________________________
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.

  • Prev by Date: Checking for App running and restart if not
  • Next by Date: Re: Still more strange things ?
  • Previous by thread: Re: Error Number: -10006 H-E-L-L-L-P!
  • Next by thread: iCal scripting through UI
  • Index(es):
    • Date
    • Thread