• 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: Numbers: 'make new' failing in various ways?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Numbers: 'make new' failing in various ways?


  • Subject: Re: Numbers: 'make new' failing in various ways?
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 31 May 2011 10:53:54 -0700

On May 31, 2011, at 9:19 AM, email@hidden wrote:

tell application "Numbers"


tell document 1
set s1 to make new sheet at end with properties {name:"aaa"}
set s2 to make new sheet at end with properties {name:"bbb"}

set t to make new table at end with properties {name:"sss", column count:4, row count:5}
end tell


return {s1, s2, t}


end tell

The right thing would be for the new table to appear in sheet "aaa". What I am seeing instead is a new table appearing in sheet "bbb" (which is active, having just been created). AFAICT make new table always puts the table in the active sheet, regardless of tell context.

The right thing for it to do in that script is to put the table in sheet bbb because it is the active sheet and you didn't tell the script to put it anywhere else.

What you need is either of these:

set t to make new table at sheet "bbb" with properties {name:"sss", column count:4, row count:5}

Or 

set t to make new table at s2 with properties {name:"sss", column count:4, row count:5}


Or 

tell s2 to set t to make new table with properties {name:"sss", column count:4, row count:5}

However, the first two of those result in this error error "The variable t is not defined." number -2753 from "t"

In this line:

return {s1, s2, t}


-- 
The notion that a radical is one who hates his country is naive and usually idiotic. He is , more likely, one who likes his country more than the rest of us, and is thus more disturbed than the rest of us when he sees it debauched. He is not a bad citizen turning to crime ; he is a good citizen driven to despair.--H.L Mencken


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Numbers: 'make new' failing in various ways? (From: email@hidden)

  • Prev by Date: Numbers: 'make new' failing in various ways?
  • Next by Date: Re: Numbers: 'make new' failing in various ways?
  • Previous by thread: Numbers: 'make new' failing in various ways?
  • Next by thread: Re: Numbers: 'make new' failing in various ways?
  • Index(es):
    • Date
    • Thread