Changeset 11320


Ignore:
Timestamp:
Nov 9, 2008, 6:23:49 PM (11 years ago)
Author:
rme
Message:

Avoid the new-with-Leopard convenience method
addTemporaryAttribute:value:forCharacterRange: so that we can keep
running on 10.4 systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-editor.lisp

    r11313 r11320  
    11711171                  (setf (ns:ns-range-location range) (+ p istart)
    11721172                        (ns:ns-range-length range) (1+ (- iend istart)))
    1173                   (#/addTemporaryAttribute:value:forCharacterRange:
    1174                    layout color-attribute color range))))))))))
     1173                  (let ((attrs (#/dictionaryWithObject:forKey:
     1174                                ns:ns-dictionary color color-attribute)))
     1175                    (#/addTemporaryAttributes:forCharacterRange:
     1176                     layout attrs range)))))))))))
    11751177
    11761178(objc:defmethod (#/drawRect: :void) ((self hemlock-text-view) (rect :<NSR>ect))
     
    12071209             (paren-highlight-left (text-view-paren-highlight-left-pos self))
    12081210             (paren-highlight-right (text-view-paren-highlight-right-pos self))
    1209              (paren-highlight-color (text-view-paren-highlight-color self)))
    1210         (#/addTemporaryAttribute:value:forCharacterRange:
    1211          layout background paren-highlight-color (ns:make-ns-range paren-highlight-left 1))
    1212         (#/addTemporaryAttribute:value:forCharacterRange:
    1213          layout background paren-highlight-color (ns:make-ns-range paren-highlight-right 1))))
     1211             (paren-highlight-color (text-view-paren-highlight-color self))
     1212             (attrs (#/dictionaryWithObject:forKey: ns:ns-dictionary
     1213                                                    paren-highlight-color
     1214                                                    background)))
     1215        (#/addTemporaryAttributes:forCharacterRange:
     1216         layout attrs (ns:make-ns-range paren-highlight-left 1))
     1217        (#/addTemporaryAttributes:forCharacterRange:
     1218         layout attrs (ns:make-ns-range paren-highlight-right 1))))
    12141219    ;; Um, don't forget to actually draw the view..
    12151220    (call-next-method  rect)))
Note: See TracChangeset for help on using the changeset viewer.