On Sep 16, 2009, at 4:15 PM, I. Savant wrote:
To do so I set -fileURL to NIL and tell the document it has been loaded from a different file using -updateChangeCount:

Um ... yuck. :-} It reminds me of all the SciFi shows where the hero jams something into the electronic lock mechanism (or shoots it with an energy weapon) and the door pops open. Worst. Lock. Ever. In reality, such an action is more likely to guarantee the door won't be able to be opened, having affected the mechanism in unexpected (and likely unwanted) ways ...

Similarly, it's generally a bad idea to short-circuit Cocoa mechanisms if you can possibly help it.


I agree. Completely.

Before I implemented this little - um - trick, I did read the NSDocument guide (again), more specifically the message flow section. While I can't know for sure that -setFileURL: during a - readFromData::: won't fry NSDocument's innards, it sure isn't spelled out as such a dangerous thing to do.

But point taken, I don't really know if its save to do what I do.

Regards
Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to