Widget message normalization

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Widget message normalization

Mark Waddingham via use-livecode
Should widgets allow the same sorts of common messages that are largely
universal to other controls?

Perhaps as a default, which could be overridden by the widget developer?

This would assume there is some sort of superclass for widgets, so that
adding this could be done once and all widgets would benefit.

We've seen some posts here about mouse-related messages in which the
developers using a widget were surprised to find those messages aren't
available.

Today this comes to mind while using the tree control widget: most tree
controls I've used (all that I can recall, really) allow arrow keys to
navigate the list - up and down select upwards and downwards, and the
left and right keys open and collapse the selected line, respectively.

I don't mind adding custom code for this, but I found the tree control
widget doesn't seem to trap arrowKey messages at all.

Given other compromised uses the tree control vs rolling my own with a
field (sort order either doesn't allow mixed numeric and alphabetical
types or throws errors, minimally modifiable appearance, etc.) I'm
inclined to write my own.

But then I got to thinking:  how often might one consider rolling a
custom solution because a supplied widget isn't quite as flexible as a
given use requires?

And with that, how many of those use-cases might be resolvable if
widgets received the same messages other controls get?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...