Selecting text from a morph under the mouse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Selecting text from a morph under the mouse

Jason Rogers-4
I would like to be able to invoke the formatter of the refactoring
browser from a menu option (or even set a preference to automatically
reformat on save).

Currently I have example code like this;

    (RBColorFormatter new format:
        (RBParser parseMethod:
            'code: xyz and: def ^ Date new printString,
''something''')) asString.

So, what I don't know how to do is to get the text of a pane that has
the mouse focus.  I would like to be able to gather that text whether
the text is highlighted or not.  Can anyone help.

--
Jason Rogers

"I am crucified with Christ..."
    Galatians 2:20

Reply | Threaded
Open this post in threaded view
|

Re: Selecting text from a morph under the mouse

Jason Rogers-4
I hate to reply to myself, but I think I have the beginnings of what I
am trying to accomplish:

    World activeHand keyboardFocus paragraph text asString

Can anyone validate that? "Do"-ing that in a workspace works, but I
don't know how to assign that to a menu command nor to keyboard
shortcut.

On 1/21/06, Jason Rogers <[hidden email]> wrote:

> I would like to be able to invoke the formatter of the refactoring
> browser from a menu option (or even set a preference to automatically
> reformat on save).
>
> Currently I have example code like this;
>
>     (RBColorFormatter new format:
>         (RBParser parseMethod:
>             'code: xyz and: def ^ Date new printString,
> ''something''')) asString.
>
> So, what I don't know how to do is to get the text of a pane that has
> the mouse focus.  I would like to be able to gather that text whether
> the text is highlighted or not.  Can anyone help.
>
> --
> Jason Rogers
>
> "I am crucified with Christ..."
>     Galatians 2:20
>


--
Jason Rogers

"I am crucified with Christ..."
    Galatians 2:20