From a practical point of view, I haven't found a delegate method that allows you to alter the proposed attributes. The closest one is one that acts on proposed typing attributes, and I assume that could change with moving the insertion point, as well as when changing attributes, and would presumably be too late in the piece anyway.
From a conceptual point of view, my understanding of MVC means that a user initiated action should be reflected in the model (text storage), which should push it through to the view, which should mean that doing the changes in the text storage "should" be OK...and it works for everything except this case. The behavior I'm observing seems to clearly be a case of the view being out of sync with the text storage, until you type something, and then it syncs up again. But anyway, I'm not here to argue what should or should not be the case - the fact is that there is an issue, and at this stage, I'm just looking for a solution... Gideon > > That sounds like a dangerous thing to do — you’re violating the expected > behavior of the class (i.e. what goes in is the same as what comes out.) > > If you want to alter the characteristics of the text, you should do so before > it goes into the text view, or in one of the explicit NSTextView delegate > hooks. I’m pretty sure at least one delegate call allows you to alter the > text (including its style) that’s about to be inserted. > > —Jens _______________________________________________ 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