+2002-06-17 Andrew Choi <akochoi@shaw.ca>
+
+ * mac.c (do_applescript): Call initialize_applescript if necessary
+ when first called. Dispose of result_desc only when there is no
+ error.
+ (Fdo_applescript): Use %d format specifier instead of %ld.
+
2002-06-16 Andrew Choi <akochoi@shaw.ca>
* macterm.c (XTread_socket): Call FrontNonFloatingWindow instead
*result = 0;
+ if (!as_scripting_component)
+ initialize_applescript();
+
error = AECreateDesc (typeChar, script, strlen(script), &script_desc);
if (error)
return error;
}
HUnlock (result_desc.dataHandle);
#endif /* not TARGET_API_MAC_CARBON */
+ AEDisposeDesc (&result_desc);
}
AEDisposeDesc (&script_desc);
- AEDisposeDesc (&result_desc);
return osaerror;
}
if (status)
{
if (!result)
- error ("AppleScript error %ld", status);
+ error ("AppleScript error %d", status);
else
{
/* Unfortunately only OSADoScript in do_applescript knows how