Changeset 6671
- Timestamp:
- Jun 3, 2007, 3:06:51 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ide-1.0/ccl/examples/cocoa-inspector.lisp
r6234 r6671 81 81 (defparameter *cocoa-inspector-nswindows-table* (make-hash-table :test 'eql)) 82 82 83 ; this is what a window should map to - an object that manages all the data a window might be displaying 83 ;;; this is what a window should map to - an object that manages all 84 ;;; the data a window might be displaying 84 85 (defclass cocoa-inspector () 85 86 ((object-vector :initform (make-array 0 :adjustable t :fill-pointer 0) :accessor object-vector) … … 87 88 (focal-point :initform 0 :accessor focal-point))) 88 89 89 ;; note that ELT pays attention to the fill pointer, while AREF doesn't!90 ;;; note that ELT pays attention to the fill pointer, while AREF doesn't! 90 91 (defmethod object ((cinspector cocoa-inspector)) 91 92 (elt (object-vector cinspector) (focal-point cinspector))) … … 93 94 (elt (object-vector cinspector) n)) 94 95 (defmethod inspector ((cinspector cocoa-inspector)) 95 (elt (inspector-vector cinspector) (focal-point cinspector))) 96 ;; This can return nil. 97 (let* ((i (focal-point cinspector)) 98 (v (inspector-vector cinspector)) 99 (n (length v))) 100 (if (< i n) 101 (aref v i)))) 96 102 (defmethod nth-inspector ((cinspector cocoa-inspector) n) 97 103 (elt (inspector-vector cinspector) n)) … … 342 348 (let* ((cinspector (gethash (inspector-window self) *cocoa-inspector-nswindows-table*)) 343 349 (column (#/selectedColumn sender))) 344 (when (< = 0 column)350 (when (< -1 column (length (object-vector cinspector))) 345 351 ;; this seems to work, but I'm not really paying attention to 346 352 ;; thread stuff... … … 355 361 (if cinspector 356 362 (let ((inspector (inspector cinspector))) 357 (inspector::inspector-line-count inspector)) 358 0)) 363 (if inspector 364 (inspector::inspector-line-count inspector) 365 0)))) 359 366 0)) 360 367 … … 452 459 ;; being handled as two single actions 453 460 (let* ((browser (inspector-browser windowcontroller))) 461 (#/setColumnResizingType: browser #$NSBrowserUserColumnResizing) 462 (#/setPrefersAllColumnUserResizing: browser nil) 454 463 (#/setDoubleAction: browser (@selector #/browserDoubleAction:)) 455 464 (#/setIgnoresMultiClick: browser t))
Note:
See TracChangeset
for help on using the changeset viewer.
