Re: sdp generating empty header
Re: sdp generating empty header
- Subject: Re: sdp generating empty header
- From: has <email@hidden>
- Date: Fri, 20 Feb 2009 18:31:40 +0000
Mark Munz wrote:
I'm not getting any useful results when I try to generate Scripting
Bridge headers.
[...]
The sdef file seems to be valid enough to allow me to actually script
the application via AppleScript w/o issue.
Anyone else run into this type of problem? Or how to get some
indication as to the source of the problem that sdp is having with the
sdef file?
Can't really comment on your own particular problem without seeing the
sdef/sdp commands you're running, though as a general point sdef, sdp
and Scripting Bridge are all prone to various compatibility problems
(some caused by bugs, some due to their design) with applications that
work fine from AppleScript. I've previously found sdp to produce buggy
headers for Word and Excel headers, and fail completely on InDesign,
and it's pretty much guaranteed to produce flawed headers for any
application whose dictionary isn't 100% perfectly formed. By
comparison, AppleScript is very forgiving of dictionary imperfections,
and that and the lack of formal validation tools from Apple mean that
minor flaws are not common in application dictionaries as they don't
show up when tested against AppleScript.
You might also want to take a look at objc-appscript (see my sig).
Unlike SB, appscript's behaviour is much closer to that of native
Apple events and AppleScript and tries to be "quirk-for-quirk
compatible" as much as possible. While it's still not completely
immune to compatibility issues with some particularly funky
applications, problems are pretty rare these days and there are
generally compatibility options and other ways of working around them
when they do occur. You also get feature parity with AppleScript plus
extra benefits such as being able to send events on background
threads, better tool support and documentation (ASTranslate is
particularly useful when you're starting out), and an API that doesn't
obfuscate everything it does.
HTH
has
--
Control AppleScriptable applications from Python, Ruby and ObjC:
http://appscript.sourceforge.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden