View Single Post
Or perhaps an OS X change ?

Error:
Code:
-- WORKS IF RUN AFTER THE FOLLOWING CODE, 
-- BUT FAILS IF RUN BEFORE IT, OR IN A SCRIPT ON ITS OWN
tell application "TextEdit"
	tell front document
		current date
	end tell
end tell

-- WORKS
tell application "TextEdit"
	set oDoc to front document
	tell oDoc
		current date
	end tell
end tell
Reversed sequence --> no error:
Code:
-- WORKS
tell application "TextEdit"
	set oDoc to front document
	tell oDoc
		current date
	end tell
end tell

-- WORKS IF RUN AFTER THE PRECEDING CODE, 
-- BUT FAILS IF RUN BEFORE IT, OR IN A SCRIPT ON ITS OWN
tell application "TextEdit"
	tell front document
		current date
	end tell
end tell

Last edited by RobTrew; 2011-09-10 at 08:11 AM..