The menu controller handled Clear but it clashed with any ongoing
selection.
In fact, eveything handled in textFieldDidReceiveEvent was already
handled in TextFieldWithExtension
It called textFieldDidAbortEditing, which called setFirstResponder,
which could clash with another setFirstResponder higher in the call
tree.
Scenario: build with an update popup, create a new script, edit its name
with an unvalid name and press the Power key while editing. When
powering on the device again, the first responder is not the popup even
though it is displayed, and pressing OK does not dismiss it.
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
The Var box controller deinited python on exit, and the console
controller did not reload python + it made the console controller lose
all its context, such as imported scripts
Now the MenuController changes the cursor location if needed once the
Textfield has handled the event.
Change-Id: I1ad3202402623dfa9a683866fef90ca33ddd6be0
To know if the AddScript row should be displayed, we need to compute the free
space size of the accordion, which is very slow. We thus memoized a bool
indicating if the AddScript row should be displayed.
Change-Id: Ia3891c0fc8df9b0b8bf2a9ad053be6dfc848c970
The scripts names are on the right and open the script edition.
The left cells open the script options.
Change-Id: I3fbab8c3861f3395c3206775c92cda3470963b26
When there is already the maximal number of scripts or when the
ScriptStore accordion buffer is full.
Change-Id: I0d43d42626da7f060a2309c66f1806b35a29bf38
When the script name is empty after renaming a script, a default new name is
given. We look for the first available scriptI.py name, with 0<I<100.
Change-Id: If17f1df95c552320c0412ce652e7ae7e0cfd9cbc
Editing, renaming, deleting or changing the auto-importation of a script
triggers the reloading of the console (the history is cleared, Python
restarted and the scripts re-imported).
Change-Id: If8b933cc077ecd36cab09214b5e7a181aa3ae030
A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.
Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
programs. The user can now add scripts.
A contextual menu displays various options when clicking on a script,
such as editing.
Change-Id: I124a17f7584b0beedb897e8499ca0a1bb6c13cbe