This is the HIG quote from above:
> "In general, quit when users close the last open window in your app. [...] If users close the last remaining document window in a document-based app and switch to another app, it’s appropriate to quit the app" (emphasis added).
In TextEdit, close the last document and then _switch to another app_. You're missing the last step.