Allow for a decorator-pattern implementation

By Michael Deroche on 27 Mar 2015
I would like to take an existing widget that comes bundled with OutSystems, and extend it to add a custom property that abstracts some logic.

For example, say I have some logic that allows the developer to create a fancy looking tooltip that is displayed when the user hovers over an element.  To install a tooltip on a button, the developer needs to drag over a new button from the widget toolbox then add two extended properties to it:
  • title: "tooltip text"
  • placement: "top"

Instead of having the developer manually set the two extended properties above, I would like to create two new properties on the button itself, called "Tooltip" and "Tooltip Placement".  Tooltip would be a text field and Tooltip Placement would be a dropdown containing "top", "right", "bottom", and "left":  This is essentially using a decorator pattern on the button widget.

This strategy allows any developer to start using the tooltips without needing to know what manual properties are required to get them initialized, and what values the "placement" can be.
This idea has no comments yet. Be the first to comment!