Commit Graph

27 Commits

Author SHA1 Message Date
Léa Saviot
d1c8bbdaf7 [apps/code] The console marks imported script for the var box
After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
2020-06-04 14:50:06 +02:00
Léa Saviot
044dc706cb [apps/code] Remove unneeded code 2020-06-04 14:50:04 +02:00
Léa Saviot
97aaff9430 [apps/code] Fix imported script variables fetching 2020-06-04 14:50:04 +02:00
Léa Saviot
e74e15eaf7 [apps/code] Handle too many Script default names used
When adding to many scripts without naming them, one can overflow the
number of default generated script names, in which case we force the
user to enter a name.
2018-11-23 12:04:05 +01:00
Léa Saviot
58c022a9a9 [apps/code] Allow any number of scripts 2018-11-23 12:04:05 +01:00
Léa Saviot
fd533834ef [apps/code] Default script name is in class Script, not menu controller 2018-11-23 12:04:04 +01:00
Léa Saviot
974519f61a [apps/code] Use TextFieldWithExtension in the list controller 2018-11-23 12:04:02 +01:00
Léa Saviot
b0e29bb9d7 [apps/code] Storage extensions do not include the dot 2018-11-23 12:04:02 +01:00
Romain Goyet
628992680b [ion] Ion::Storage is not a global variable anymore 2018-04-10 15:09:30 +02:00
Émilie Feral
b0ede47d55 [ion] Change Storage design (former kallax) 2018-03-22 14:01:38 +01:00
Émilie Feral
f9656fd94f [ion] Namespace Record and Kallax 2018-03-22 14:01:38 +01:00
Émilie Feral
b9a852a9d1 [escher] Change name: File --> Record, FileSystem --> Kallax 2018-03-22 14:01:38 +01:00
Émilie Feral
19ca0f0640 [apps] Code: use the FileSystem to store the scripts instead of an
accordion
2018-03-22 14:01:38 +01:00
Émilie Feral
c5e525ddb7 Enable to give options at run-time 2018-03-22 11:58:56 +01:00
Léa Saviot
38ec9429aa [code] User defined functions and variables are in the same menu.
Change-Id: I420df64cac76407f8d964db680e753f01e20e78c
2017-12-01 13:46:29 +01:00
Léa Saviot
e6b4d07cb6 [code] Dynamic toolbox that displays script functions and variables.
Change-Id: Id1494580b3832540633d3aefaf04710d21e0a44c
2017-12-01 12:06:05 +01:00
Léa Saviot
37a2def2f1 [code] The maximal number of scripts is stored in the ScriptStore.
It was in the MenuController before.

Change-Id: I5f48465d92b53079dc358feec7a4b713875c7e2d
2017-12-01 12:06:05 +01:00
Léa Saviot
07c6acada4 [escher/code] Move Accordion from escher/ to apps/code/.
Change-Id: Id90ef9791f8c18bcdce497b8e20f060314f7b58b
2017-11-17 14:05:23 +01:00
Léa Saviot
4f74b6d849 [code] The addScript button disappears when needed.
When there is already the maximal number of scripts or when the
ScriptStore accordion buffer is full.

Change-Id: I0d43d42626da7f060a2309c66f1806b35a29bf38
2017-11-17 14:05:23 +01:00
Léa Saviot
07bffe9069 [code] Increased memory allocated for scripts to 4096.
Change-Id: Ida0c3190e4aa21a2e373bf3d1561a97006c84e4b
2017-11-17 11:59:50 +01:00
Léa Saviot
a19377ad5e [code] Default numbered script names (e.g. script1.py)
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
2017-11-17 11:59:50 +01:00
Léa Saviot
6ee47d6168 [code] Prevent script name extension edition.
Change-Id: I4ac8d032fd88b853670afeebaecc8d6fd5ef981d
2017-11-17 11:59:50 +01:00
Léa Saviot
745eddfa05 [code] Added default Fibonacci script.
Change-Id: I2766fa542ee64722018486a874e9855a5976a788
2017-11-17 11:59:50 +01:00
Léa Saviot
35520fb3d4 [code] Scripts can be automatically imported when the console is opened.
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
2017-11-17 11:59:50 +01:00
Léa Saviot
fbb5c70339 [code] Cleaned Script and ScriptStore classes, created accordion.h
A Script object now contains its AutoImport marker, its name and its
content. The ScripStore methods have better names and the optimization
is cleaner.

Change-Id: I1b21af2d23f1c9a34f984309512b0c01b2f1c320
2017-11-17 11:59:50 +01:00
Léa Saviot
a14cfd0aea [code] Script names are displayed and can be edited.
Change-Id: I5acc468920b66673e78da130bf90a74d0c062211
2017-11-17 11:59:50 +01:00
Léa Saviot
5de4b5cd67 [code] Each script has a name, stored in the accordeon buffer.
A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.

Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
2017-11-17 11:59:50 +01:00