Closed ericweiner closed 2 months ago
Can we add the same validation we added in issue #364 into every single text/number input box?
So they only allow 0-9 and "."
This should be resolved on the feature/imagej
branch now.
now pressing escape quits the program. Gracefully, it does not crash. This same thing happens in the previous version (1.8). So I guess this is the default behavior in Kivy..? Is this possible to change? (this is true regardless of where the cursor is).
I've updated the feature/imagej
branch to disable the program exit when pressing the escape key.
Using ImageJ branch from 5/28
if you type in an non-number into the resolution box, it crashes. Could we do my second suggestion above, to only allow 0-9 and "." in all numerical boxes?
Traceback (most recent call last):
File "C:\Users\chris\Downloads\LumaViewPro-feature-imagej-2024-05-28\LumaViewPro-feature-imagej\lumaviewpro.py", line 5005, in
The escape key fix works- the program no longer exits.
This happens if you enter in a letter in the "step size" dialog, for example.
Traceback (most recent call last):
File "C:\Users\chris\Downloads\LumaViewPro-feature-imagej-2024-05-28\LumaViewPro-feature-imagej\lumaviewpro.py", line 5005, in
I've updated the feature/imagej
branch to resolve all the input boxes I've found. They already had Kivy input filters applied to them to limit the characters to be integer or float (as required), but the issue stemmed from leaving the field blank. This was then interpreted as a string and failed to cast to int/float.
In the frame size resolution error, I added boundary checking based on what the camera will allow (for both min and max) now.
in v1.8
Steps to reproduce:
(if that doesn't make it crash, then delete the number, then press escape)
Crash: [INFO ] [LVP Main ] MicroscopeSettings.frame_size() [INFO ] [Base ] Leaving application in progress... Traceback (most recent call last): File "C:\Users\chris\Downloads\LumaViewPro-main-1.8\LumaViewPro-main\lumaviewpro.py", line 5462, in
LumaViewProApp().run()
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\app.py", line 956, in run
runTouchApp()
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\base.py", line 341, in mainloop
self.window.mainloop()
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\core\window\window_sdl2.py", line 776, in mainloop
if self.dispatch('on_key_down', key,
File "kivy_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\core\window__init.py", line 163, in _on_window_key_down
return self.dispatch('on_key_down', keycode, text, modifiers)
File "kivy_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\uix\textinput.py", line 2936, in keyboard_on_key_down
self.focus = False
File "kivy\properties.pyx", line 520, in kivy.properties.Property.set
File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
File "kivy_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy_event.pyx", line 1189, in kivy._event.EventObservers._dispatch
File "C:\Users\chris\AppData\Roaming\Python\Python310\site-packages\kivy\lang\builder.py", line 55, in custom_callback
exec(kvlang__.co_value, idmap)
File "C:\Users\chris\Downloads\LumaViewPro-main-1.8\LumaViewPro-main\lumaviewpro.kv", line 1637, in
on_focus: if not self.focus: root.frame_size()
File "C:\Users\chris\Downloads\LumaViewPro-main-1.8\LumaViewPro-main\lumaviewpro.py", line 4757, in frame_size
w = int(self.ids['frame_width_id'].text)
ValueError: invalid literal for int() with base 10: ''