Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript's 'with transaction' statement broken? (Or just misunderstood?)



Hi all,

Wondering if anyone has any recent experience of using AppleScript's 'with transaction' blocks?

Background: I've been developing test scripts for appscript, including one that checks appscript's transaction support is working correctly. As I don't have any transaction-aware applications myself I wrote a little aete-less test application that implements 'miscbegi' (begin transaction), 'miscendt' (end transaction), 'miscttrm' (abort transaction) event handlers, plus a 'TestTran' (test transaction support) handler to check if it's working. Before using it to test appscript, I ran the following AppleScript just to make sure the test app was working correctly:

tell application "AETest"
	with transaction
		«event TestTran»
	end transaction
end tell

What I had expected was that AppleScript would send a 'miscbegi' event, followed by a 'TestTran' event, followed by a 'miscendt' event. However, only the 'TestTran' handler actually got called.

So my question is: has anyone tried using AppleScript's 'with transaction' statement on Tiger with applications that are known to support it? Did it actually work or was it just ignored, i.e. broken?

I believe some applications define their own 'start/end transaction' commands in their dictionaries instead of relying on 'with transaction' blocks; is there a specific reason behind that (e.g. 'with transaction' is known to be problematic), or is it just bad design by developers who didn't understand how to implement transaction support correctly?

It's also possible that I missed something when implementing my test app; I didn't have much luck Googling for documentation. Any pointers there would also be helpful.

Thanks,

has
--
http://freespace.virgin.net/hamish.sanderson/
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.