Hi,
I need to set an on-mouse-over event either to a form or preferably to an element (text field). How can I achieve this?
Regards,
Hareendra
Hi,
I need to set an on-mouse-over event either to a form or preferably to an element (text field). How can I achieve this?
Regards,
Hareendra
Hi Hareendra,
As far as I know there is no real onMouseOver event. There are some events being triggered when you already started a drag event but a pure-and-simple onMouseOver doesn’t exist.
I suggest you file a feature request for this.
Maybe Patricks keylisteners plugin could be expanded to also listen to mouse events?
IMHO opinion, this should be default Servoy behaviour…
I agree, to a certain extent. In Visual FoxPro we’ve always had literally hundreds of events that you can hook into. Or even use a BINDEVENTS command to redirect events to specific objects. The problem is determining where to draw the line. With more control and more possibilities come more complexity and loss of focus on the properties and methods that really matter. Debugging can become a nightmare when events start singing around or respond differently at runtime.
yup, but leave that up to the developer, instead of letting the Software vendor (Servoy) decide that…
omar:
Maybe Patricks keylisteners plugin could be expanded to also listen to mouse events?
key events and mouse events are really different, so I don’t think the keyListeners is a good place to put this, it’s like mixing apples and oranges.
But I’m sorry to say that I don’t see the point of creating mouse events…
I fear it is very bad practice and I’ve never seen any good justification for it.
So my question would be: what’s the idea?
Creating an automated UI testing tool of some kind?
As a good practice, event handlers should always delegate the real treatment of an event to a generic function, never treat it directly.
If you follow this simple pattern, then calling the real function directly is not an issue.
If you really need to pass the event, you can even create a dummy JS Object that will act as an event and there you go!
[edit] I misread the intention of the poster, which was to handle mouseOver events, which can be useful indeed…
(I rest my case about creating mouse events though)