NSTextField syle undo manager with NSTextView?

  • Hi,

    I'm implementing undo in a document based app with both text views
    and text fields.  I notice they don't work the same wrt undo.  The
    text field has its own undo manager and after editing ends pushes the
    results out to the bound value property.  The text view does this and
    tracks changes in the docs undo manager as well.  Since I am KVO-ing
    changes to my model, I don't need/want the text view to record
    changes in the docs undo manager.  I rather like the way its being
    done with the NSTextField.

    Does anyone know how to set up an NSTextView so that it works the
    same as NSTextField wrt undo/redo?

  • I will send this separately to both cocoa-dev and xcode-users.

    I am seeing an odd problem with cut-and-paste and drag operations
    in some but not all Cocoa applications I have written:  For some
    such applications, I am unable to cut and paste or drag text from
    any source into NSTextViews in the application.

    This problem *only* occurs on my Macbook 13 running OS X 10.4.11;
    the affected applications work fine on an old Powerbook G3 running
    10.4.11.  The problem may have begun when I upgraded to 10.4.11,
    but I did not notice it at the time.  (I'd like to know whether
    it also occurs in Leopard, but I can't get my 10.5.1 partition to
    start today.)

    The code I wrote to override "performDragOperation" and "paste"
    has not changed in months, and certainly worked in 10.4.10 and
    earlier.  All this code was compiled under various versions
    of 10.4, on my Intel Macbook, with XCode 2.4.1.

    Comparison of archived versions of my source with the present one
    suggests that the problem is not in the source but in the Intel
    version of something linked in at build time.

    I searched list archives and the web, and turned up comments about
    something similar in Leopard for which there was a recommendation
    to reboot in safe mode and do a permissions repair in the disk
    utility, which I did, with no effect on the problem.  I also did
    a general disc repair and a hardware test, with no hint of problem
    and no effect on the problem.

    Any clues or suggestions?  Anyone know of discussions in any other

    --  Jay Reynolds Freeman
    http://web.mac.com/jay_reynolds_freeman (personal web site)
previous month january 2008 next month
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Go to today