Thread-topic: jumpstart me with the scripting bridge
User-agent: Microsoft-Entourage/11.3.3.061214
I'd like to tell BBEdit to "make new window" using Cocoa Scripting Bridge,
but nothing is working. Here is the gist:
BBEditApplication* bb = [SBApplication applicationWithBundleIdentifier:
@"com.barebones.bbedit"];
[bb activate];
BBEditTextDocument *doc = [[[bb classForScriptingClass: @"text document"]
alloc] init];
[[bb textDocuments] addObject:doc];
That last line gets an error (-1708) from BBEdit. I can see that the Apple
event being sent is not like the Apple event that is sent when I say "make
new window" in Script Editor. In fact, since I can read Apple events, I can
see that the Bridge is effectively saying, "make new text document at end of
every text document". Well, if you say that to BBEdit, BBEdit will cry out
in pain. That isn't what I want to say. I want to say what BBEdit wants to
hear (i.e. without the "at end of every text document") - but I don't see
how. (Basically, I want to make this new text document at the end of null,
if you see what I mean.) Is the "make" mechanism in the scripting bridge
just unable to speak this way? Or is there another object creation idiom
that the docs aren't telling me about? m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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
This email sent to email@hidden