on 2007-11-06 3:52 PM, Matt Neuburg at email@hidden wrote:
[[bb textDocuments] addObject:doc];
I'm not familiar with BBEdit's dictionary, but what if you changed
this to:
[bb addObject:doc];
That won't work, because bb is the application itself, which means it
isn't an array. Try using -insertObject:atIndex: instead.
When you say "addObject", Scripting Bridge has to send an event to the
application to do that. The problem is that there are at least three
different ways to express that (with a position, without a position,
and with a container; more if you count the different ways of
expressing a position), and a lot of applications only understand one
of them. We went with the one that all Cocoa apps understand ("...at
end of..."), and there's no way to override that. [1]
--Chris Nebel
AppleScript Engineering
[1] Well, no straightforward way, anyway. You could get sneaky with
the -eventDidFail delegate method, and re-jigger and re-send the event
if you see it fail.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-implementors/email@hidden