Using the better code form preble's 7330a0024296a41b21d05c150aeb255c89a54500 for setDocumentEdited (Switched to Xcode 4)