[Openmcl-devel] opengl rubix example

Gary Byers gb at clozure.com
Mon May 2 19:54:07 PDT 2005



On Mon, 2 May 2005, Lawrence E. Bakst wrote:

> *flame on. feel free to ignore this rant* The fact that Cocoa can't
> do some of the standard multi-button emulation, is just another
> reason I hate frameworks. BTW, in the new Hemlock stuff, every time
> I do a paste, Cocoa likes to add a space after it. Something Gary
> mentioned a long time ago in an unrelated email. Thank you Cocoa for
> assuming that I would want a space after a paste, and thanks again
> for probably not giving me an API way to change it, and thanks again
> for not making it open source so I can fix it myself, and thanks
> again for using obj-c, because if it was CLOS I could use method
> combination to fix it even if it was close source.

It sounds like the Hemlock editor is neglecting to disable "smart 
insertion" in the NSTextView subclass.

(I have no idea why adding extra spaces is considered smarter than
"doing something useful", but it's the default behavior.)

> How soon until someone adds the delete the space after paste hack
> to Hemlock and how soon before Apple changes the behavior of Cocoa
> and we need to take the fix out?

This notion of smart insertion has apparently been around for a long
time (I'm not sure how long, but it's implemented in GNUstep.)

The function MAKE-SCROLLING-TEXT-VIEW-FOR-TEXTSTORAGE (in
"cocoa-editor.lisp") sends a bunch of initialization messages to the
newly created HEMLOCK-TEXT-VIEW object ("tv"); in order to revert to
GoodOldDumbInsertion, it needs to do:


      (send tv :set-smart-insert-delete-enabled nil)



More information about the Openmcl-devel mailing list