I've noticed that using accessibility functions to change the text in a Text
Edit window doesn't dirty the Text Edit document or invoke its undo/redo
mechanism. Thus, if the user closes the window, he isn't warned that he's
losing changes. (I haven't yet explored whether this is true of all
applications.)
Should this be viewed as a bug in Text Edit? That is, is it up to
application developers to notice when an Accessibility function changes
something that should dirty the document and set up an undo menu item? If
so, I don't find anything in the existing documentation that clearly calls
out this obligation.