Numbers: 'make new' failing in various ways?
Numbers: 'make new' failing in various ways?
- Subject: Numbers: 'make new' failing in various ways?
- From: email@hidden
- Date: Tue, 31 May 2011 16:19:36 +0000 (GMT)
I've had about a year hiatus from Mac, but now I am back and back with AppleScript again. Now facing one of those typical issues, this time with Numbers 2.0.3.
First of all, creating a new document is not working for me. I have tried
tell application "Numbers"
make new document
end tell
...and...
tell application "Numbers"
make new document at end
end tell
...and...
tell application "Numbers"
make new document at end with properties {name:"my document"}
end tell
and in every case I'm getting
Can’t make application \"Numbers\" into type reference." number -1700 from application "Numbers" to reference
OK, well I can live with that for now, but it is a showstopper for more adventurous work.
I've had slightly better luck making a new table in an existing sheet, but no matter what I try, new tables are placed into the active sheet, rather than the tell target.
Here is a bare bones test case:
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.
I have tried using
but no joy. I can see no way of activating a given sheet. It quacks like a bug.
-Brennan
_______________________________________________
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