focusable and clickable

"Charles Goodwin" <charlie-wHF57V0oYf6w5LPnMra/[email protected]>
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
David,

I've just been thinking about the text widget whilst dealing with a minor
issue to do with focusable/selectable.

I'm thinking of moving the _Press1 trap to focus out of focusable:
        // Click-to-focus
        _Press1 = function() {
            if ( focusable ) focused = true;
        }

...and instead having it in clickable (in that clickables click to focus).
 Now, you probably consider 'text' to be a none-clickable object, but
that's not entirely true.

You could use 'activated' to turn on text highlighting.

I'm just trying to think of ways to integrate focusable, clickable and
selectable behaviours.  Having the _Press1 to focus trap in focusable is a
bit of a pain in that _focused traps higher up in the cascade need to call
arguments.cascade( f ) first to make sure they're operating using the
right value.

eg things like selectable shift the focus to the selected widget of that
group, so you have focused = true on the unselected widget, then if it's
not selected by the action, focused = false is put to it as the selected
widget steals focus.  Whilst this is not consistent with monopoly
behaviour - selectables 'select' on Press1 - it is more consistent with
overall behaviour of clickables.

- Charlie
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.