From bc644d97e3aadf6c96e0e5762d471391eeda677a Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 15 Apr 1999 16:49:10 +0000 Subject: [PATCH] ... original commit: 0d24d7cd5b363ef9c35912ffa92f01fa46012aad --- collects/framework/editor.ss | 10 +++++++++- collects/framework/text.ss | 17 +---------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/collects/framework/editor.ss b/collects/framework/editor.ss index dcb8762e..e662b8d9 100644 --- a/collects/framework/editor.ss +++ b/collects/framework/editor.ss @@ -24,11 +24,19 @@ (define basic-mixin (mixin (editor<%>) (basic<%>) args + + (inherit copy-self-to) + (override + [copy-self + (lambda () + (let ([editor (make-object (object-class this))]) + (copy-self-to editor) + editor))]) + (inherit get-filename save-file refresh-delayed? get-canvas get-max-width get-admin set-filename) - (private [has-focus #f]) (rename [super-on-focus on-focus]) diff --git a/collects/framework/text.ss b/collects/framework/text.ss index 8fdef440..84d1fa05 100644 --- a/collects/framework/text.ss +++ b/collects/framework/text.ss @@ -244,7 +244,6 @@ (send dc set-brush old-brush))))) range-rectangles))]) - (private [styles-fixed? #f] [styles-fixed-edit-modified? #f]) @@ -302,20 +301,6 @@ (sequence (apply super-init args) (set-autowrap-bitmap (initial-autowrap-bitmap))))) - - (define copy-editor-snip% - (class editor-snip% (copy% text) - (override - [copy - (lambda () - (let ([text (make-object copy%)]) - (send text insert "AA") - (let loop ([snip (send text find-first-snip)]) - (when snip - (send text insert (send snip copy)) - (loop (send snip next)))) - (make-object copy-editor-snip% copy% text)))]) - (sequence (super-init text)))) (define searching<%> (interface () @@ -329,7 +314,7 @@ [on-new-box (lambda (type) (if (eq? type 'text) - (make-object copy-editor-snip% searching% (make-object searching%)) + (make-object editor-snip% (make-object searching%)) (super-on-new-box)))]) (public [find-string-embedded