From 4b575c315b02e71c32823e155d2e32a3445a6817 Mon Sep 17 00:00:00 2001 From: Asumu Takikawa Date: Fri, 29 Apr 2011 11:38:50 -0400 Subject: [PATCH] Fixed inconsistent return values for get-pos/text. --- collects/framework/private/editor.rkt | 2 +- collects/scribblings/framework/editor.scrbl | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/collects/framework/private/editor.rkt b/collects/framework/private/editor.rkt index 0c8981b620..c2de47acd5 100644 --- a/collects/framework/private/editor.rkt +++ b/collects/framework/private/editor.rkt @@ -73,7 +73,7 @@ (if (and snip (is-a? snip editor-snip%)) (loop (send snip get-editor)) - (values editor #f)))] + (values #f editor)))] [else (values #f #f)]))))) ;; get-filename/untitled-name : -> string diff --git a/collects/scribblings/framework/editor.scrbl b/collects/scribblings/framework/editor.scrbl index e78981c79b..ccfd73a135 100644 --- a/collects/scribblings/framework/editor.scrbl +++ b/collects/scribblings/framework/editor.scrbl @@ -127,15 +127,15 @@ } @defmethod[(get-pos/text [event (is-a?/c mouse-event%)]) - (values (or/c false/c (is-a?/c editor<%>)) - (or/c false/c number?))]{ + (values (or/c false/c number?) + (or/c false/c (is-a?/c editor<%>)))]{ This method's first result is @scheme[#f] when the mouse event does not correspond to a location in the editor. - If the first result is an @scheme[text%] object, then the - second result will be a position in the editor and - otherwise the second result will be @scheme[#f]. + If the second result is a @scheme[text%] object, then the + first result will be a position in the editor and + otherwise the first result will be @scheme[#f]. The @scheme[editor<%>] object will always be the nearest enclosing editor containing the mouse click.