AppleScript support - 10.3/10.4
AppleScript support - 10.3/10.4
- Subject: AppleScript support - 10.3/10.4
- From: Dragan Milić <email@hidden>
- Date: Sun, 4 Feb 2007 23:32:38 +0100
Hello everyone,
Perhaps this should be posted to any of lists dedicated to
AppleScript, but is' related not to AppleScript specifically, but
more to support for it in an Cocoa application, so I still hope this
is the right place. If not, I apologise in advance.
I've developed a UB Cocoa app, which still needs to work on Panther
10.3+, so even prior 10.3.9. For that reason, I built the executable
with the following environment variables:
GCC_VERSION_i386: 4.0
GCC_VERSION_ppc: 3.3
MACOSX_DEPLOYMENT_TARGET_i386: 10.4
MACOSX_DEPLOYMENT_TARGET_ppc: 10.3
SDKROOT_i386: /Developer/SDKs/MacOSX10.4u.sdk
SDKROOT_ppc: /Developer/SDKs/MacOSX10.3.9.sdk
The app works fine on both 10.3.x and 10.4.x on PPC and 10.4.x on
Intel. Now I need to add some basic AppleScript support, and there I
encounter a problem, probably related to differences in scripting
definitions in 10.3 and 10.4. Following Apple Developer
documentation, I've created .def file and run sdp tool to produce
both .scriptSuite and .scriptTerminology files. All three files are
then included into app bundle resources.
On 10.3.x and PPC, everything works OK, I can open app's scripting
definition dictionary from within Script Editor and successfully use
all definitions from my scripting suite (classes, commands, etc.).
The same goes for running on 10.4.x and Intel processors. But, I've
got a problem when running on 10.4.x and PPC. I can still open
scripting definition dictionary from within Script Editor and read
all the definitions from my scripting suite, but if I try to use any
of them in the script, the Script Editor complains about undefined
variable. For example, there is the command "extract" in the suite, I
can clearly see it when opening dictionary, but every attempt to use
it in the script results with the "The variable extract is not
defined." message in an error sheet of the editor. The same goes for
classes, type definitions, etc. Building the executable without
environment variables mentioned above solves the problem, so I can
successfully script the app on 10.4.x and PPC, but of course, I can't
run it on system version prior to 10.3.9 (because of gcc 4.0).
Clearly, the collision happens when trying to script executable built
for 10.3 and running on 10.4. What is not clear to me is how this
situation can be overcome. Any hint or tip is highly appreciated.
Regards,
Milke
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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