Changeset 12494


Ignore:
Timestamp:
Jul 31, 2009, 12:24:00 PM (10 years ago)
Author:
gb
Message:

Separate #+/#-cocotron versions of #/initWithString:, for now.

I have no idea what happened to the welcome banner in the listener.

File:
1 edited

Legend:

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

    r12493 r12494  
    705705   +null-ptr+))
    706706
     707
     708#-cocotron
     709(objc:defmethod #/initWithString: ((self hemlock-text-storage) s)
     710  (setq s (%inc-ptr s 0))
     711  (let* ((newself (#/init self))
     712         (styles (make-editor-style-map))
     713         (mirror (make-instance ns:ns-mutable-attributed-string
     714                                   :with-string s
     715                                   :attributes (#/objectAtIndex: styles 0))))
     716    (declare (type hemlock-text-storage newself))
     717    (setf (slot-value newself 'styles) styles)
     718    (setf (slot-value newself 'hemlock-string) s)
     719    (setf (slot-value newself 'mirror) mirror)
     720    (setf (slot-value newself 'string) (#/retain (#/string mirror)))
     721    newself))
     722
     723#+cocotron
    707724(objc:defmethod #/initWithString: ((self hemlock-text-storage) s)
    708725  (setq s (%inc-ptr s 0))
Note: See TracChangeset for help on using the changeset viewer.