On Friday 04 December 2015 10:42:44 Graeme Geldenhuys wrote: > > Just curious (again, I don't know MSEgui), but from the method > signature, can you also do the following (with the same outcome as above)? > > if avalue < 0 then > begin > accept := false; > showMessage(....); > end; > Yes, but then the user needs to enter a valid value before the widget can be leaved and t*edit.value property will still contain the old value. The sequence is: - User enters text. - User presses enter, tries to leave the edit widget or t*editwidget.checkvalue() will be called or a button will be clicked (there are some more activities which trigger checkvalue()). - T*editwidget tries to convert the entered text to type of the value property. - If the conversion fails it shows an error message. - If the conversion succeeds onsetvalue will be called with the converted value as var parameter, t*editwidget.value still has the old value. - If onsetvalue returns accept = false further processing stops. - If onsetvalue returns accept = true the new value which possibly has been modified by onsetvalue will be stored in t*editwidget.value property. - ondataentered event will be called.
Martin ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk