[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]

Does anyone have any simple example code that implements the file
ccl:examples;text-edit-dialog-item?  I'm interested in some code that might:

1) Create a window and if needed, install a shared te-handle
2) Create several text-edit-dialog-items that can share that te-handle
3) Switch my focus between these different text-edit-dialog-items
3) Clean up when it's done (make sure the te-handle goes away if I created it)

It's not clear from the file if the field *te-handle* is created for all 
of MCL and all windows share it, or if each window has it's own.  Some
code that I've been playing with (but doesn't work) is:

(defvar the-window nil)
(defvar field-1 nil)
(defvar field-2 nil)

(defclass fieldWindow (window)
  ((text-list :initform nil
              :accessor text-list)) 
   :color-p t)
   "To test text-edit-dialog fields"))

(setf the-window (make-instance 'fieldWindow :window-title "Field Test"
                     :view-size #@(300 150)))
(setf field-1 (make-instance 'text-edit-dialog-item
                  :view-size #@(50 50)
                  :view-position #@(0 0)))
(setf field-2 (make-instance 'text-edit-dialog-item
                  :view-size #@(50 50)
                  :view-position #@(60 0)))
(install-view-in-window field-1 the-window)
(install-view-in-window field-2 the-window)
(set-dialog-item-text field-1 "This is something to display")
(set-dialog-item-text field-2 "This is something else")


Jeffrey Kane, MD
Kane Biomedical Systems
Boston, MA

Internet    jbk@world.std.com
Compuserve  74206,640
AppleLink   D0738

[Don't take life too seriously... it's not like anyone gets out of it alive.]