Changeset 7143


Ignore:
Timestamp:
Sep 5, 2007, 5:21:03 AM (12 years ago)
Author:
gb
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/ChangeLog

    r7141 r7143  
     12007-09-04 23:11  gb
     2
     3        * cocoa-ide/cocoa-editor.lisp: New! Improved!
     4       
     5        The code which arranges for editing changes to be processed in the
     6        main thread now does so via an NSInvocation (ObjC's notion of a
     7        closure, sort of); the methods which run in the main thread handle
     8        the job of synchronizing the underlying the Hemlock string and the
     9        "real" NSMutableAttributedString as well as informing the text
     10        system of pending editing changes via
     11        #/edited:range:changeInLength:.  The code which processes deletions
     12        does the change processing before modifying the string (other
     13        methods do it after the change); this seems to be necessary to
     14        avoid some things that could cause ticket:50.  (I'm not sure if
     15        this fixes ticket:50, but it does seem to fix a reproducible case.)
     16       
     17        The #/replaceCharactersInRange:withString: method on
     18        hemlock-text-storage (which handles buffer changes originating from
     19        non-Hemlock sources) is careful to use a :right-inserting temporary
     20        mark when modifying the buffer, to help ensure that
     21        insertions/deletions take place at the correct absolute position.
     22        (This may at least partially address bugs related to things getting
     23        confused/out-of-bounds errors when doing lots of cutting and
     24        pasting, though it's hard to know without reproducible cases.)
     25       
     26        The macros NSSTRING-ENCODING-TO-NSINTEGER and
     27        NSINTEGER-TO-NSSTRING-ENCODING are defined before they're used (at
     28        least one of them wasn't.)
     29       
     30        The handling of text encoding for editor documents has changed in a
     31        few ways.  If "automatic" encoding is used in an "Open ..." dialog
     32        and is successfully able to infer a text file's encoding, the
     33        encoding that was inferred becomes the document's encoding (used in
     34        subsequent "save" operations.)  On some OSX versions, the automatic
     35        detection mechanism can only recognize UTF-16 files that contain a
     36        leading BOM (and the editor's code for dealing with the automatic
     37        mechanism didn't expect this to ever work.)  On other systems, the
     38        automatic mechanism can return something correct (I've seen UTF-8)
     39        but possibly suboptimal.
     40       
     41        The Open... dialog now defaults to something derived from the
     42        user's setting of CCL:*DEFAULT-FILE-CHARACTER-ENCODING*; because
     43        "automatic" is a little unpredictable, the new default is probably
     44        better.
     45       
     46        The NSDocument mechanism for creating backup files (with names of
     47        the form "name~.ext") is not used; when backup files are created,
     48        we try to copy the original to a file whose name conforms to the
     49        (simple, non-versioned) Emacs scheme ("name.ext~").  More things
     50        seem to work better when the Emacs scheme is used (though I suppose
     51        some people might prefer the NSDocument scheme and we could make
     52        this a preference.)
     53
    1542007-09-04 22:11  gb
    255
Note: See TracChangeset for help on using the changeset viewer.