Roberto Nicchi Posted November 10, 2021 Share Posted November 10, 2021 The onchange event of the TuniFormattedNumberEdit class is not executed correctly. Look at the demo app i have attached to this post. In the form there are 4 components. One is a TuniFormattedNumberEdit component. The value of the component is changed in the form.oncreate event. When the focus is moved into the component the onchage event is executed. It's shouldn't. This doesn't happens for the TuniNumberEdit class. IMPORTANT: Use the tab key to change the focus. thanks Roberto Project1.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 10, 2021 Share Posted November 10, 2021 Hello, 30 minutes ago, Roberto Nicchi said: When the focus is moved into the component the onchage event is executed. Are you sure? Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 Just now, Sherzod said: Hello, Are you sure? Very Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 Use the TAB key, not the mouse. Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 I'm using 1552 so not the latest version but looking at the change log i see nothing about this thing. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 10, 2021 Share Posted November 10, 2021 4 minutes ago, Roberto Nicchi said: Use the TAB key, not the mouse. Yes, it is quite possible, not only when using the tab button (the reason that formatting is used I guess) Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 6 minutes ago, Sherzod said: Yes, it is quite possible, not only when using the tab button (the reason that formatting is used I guess) In the demo app it happens using the TAB key but i guess you are right and can happens also using the mouse. There will be a fix ? Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 10, 2021 Share Posted November 10, 2021 Just now, Roberto Nicchi said: In the demo app it happens using the TAB key Yes.. also with navigation keys Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 2 minutes ago, Sherzod said: Yes.. also with navigation keys Ok, waiting for a fix. Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 10, 2021 Share Posted November 10, 2021 30 minutes ago, Roberto Nicchi said: waiting for a fix For now you can try this workaround... procedure TMainForm.UniFormCreate(Sender: TObject); begin field2.Value:=10; field3.Value:=10; field3.JSInterface.JSAddListener('change', 'function(sender, newVal, oldVal){if (sender.rawValue==oldVal) return false}') end; Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted November 10, 2021 Author Share Posted November 10, 2021 1 hour ago, Sherzod said: For now you can try this workaround... procedure TMainForm.UniFormCreate(Sender: TObject); begin field2.Value:=10; field3.Value:=10; field3.JSInterface.JSAddListener('change', 'function(sender, newVal, oldVal){if (sender.rawValue==oldVal) return false}') end; Hello, you code seems to work fine. Anyway i have to correct what i have said before; seems the problem happens also with the TuniNumberEdit class. I have used your code also for that class and seems to solve the problem. I have attached to this post an example that shows the problem with a TuniNumberEdit component also. Let my know if you can't reproduce the problem running the app. thanks Project1.zip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.