Maybe this can be done somehow I do not know, but I would like to show a text in the StatusBar when an element gets the focus. Maybe a property for the elements, for example StatusBarText, could do it.
When the element gets the focus and that property is not empty it could be shown.
You can use the onFocusGained event on the elements to trigger a method that sets the statustext (application.setStatusText() ).
And of course the onFocusLost event to clear it again.
That way works but I think that is faster if Servoy could do that automatically. Think about a form with 50 elements.
Could be like the ToolTip. Servoy traps OnMouseOver and OnMouseLeave to show the ToolTip, the same way Servoy could trap onFocusGained and onFocusLost, check if statusBarText property is empty or not and act.
Don´t you think it´s easier for Rapid Development?
properties i could see some use cases. (to give the elements some extra (configuration) properties that you can ask for)
But what would methods really do?
With methods I really meant access and assign methods.
The access method should fire when a property value is accessed, the assign method should fire when a property is assigned a new value.
With such methods you could simply implement custom validation, that´s their primary use.
What I meant is a method that fires when the value of a custom property changes. So it is like onDataChange per property, you need to be able to add a pair of methods per custom property.
Example: If I would add myProprty to an object I would expect myProperty_Assign and myProperty_Access methods to be added automatically.
Add custom methods to elements is also a good idea if we could subclass elements. With Visual FoxPro you can subclass a base element (for example a textbox) this way you can create an element with code that can be used many times in your app without having to rewrite the code, much more if you need to make a change you can simply modify the class code that will be propagated.