Léa Saviot
17e7d36009
[apps/code] If EPSILON_GETOPT, auto import scripts
2019-01-09 16:13:46 +01:00
Léa Saviot
1c306658ce
[apps/code] Fix Python environment loading order
2019-01-09 16:13:46 +01:00
Léa Saviot
4f4ae4e0f7
Merge branch 'master' into python_turtle
2019-01-08 14:32:43 +01:00
Léa Saviot
58f94f5e5f
[apps/code] Check that app can be exited before switching to DFU
...
This fixes the following crash: create a script which contains only
"input()". Execute it, then while in the input, plug in the calculator.
When un-plugging it, the device crashes.
2019-01-07 13:36:01 +01:00
Léa Saviot
1782326ed8
[apps/code] Clean ConsoleController code
2019-01-07 13:36:01 +01:00
Léa Saviot
33072eb9b1
[apps/code] Add some comments
2019-01-07 13:36:01 +01:00
Léa Saviot
8830821d0e
[apps/code/python] Inline and indent some code
2019-01-07 13:36:01 +01:00
Léa Saviot
9b07f1936e
[apps/code] Squares script template: start by resetting the turtle
2019-01-03 15:28:55 +01:00
Léa Saviot
384fa04798
[apps/code] Change the default scripts: squares instead of factorial
2018-12-27 17:21:10 +01:00
Léa Saviot
03f300a754
[python/turtle] Add showturtle and hideturtle to the toolbox
2018-12-27 17:09:45 +01:00
Léa Saviot
df2b9c4d81
[escher/apps] Get children count via template in ToolboxMessageTree::Node
2018-12-21 13:29:32 +01:00
Léa Saviot
4b306791c0
[python/turtle] Turtle::m_drawn is false if sandbox not displayed
...
This way, Turtle::draw() and erase() are more symetrical and no not
perform themselves if the turtle is already drawn / erased.
2018-12-18 12:05:46 +01:00
Léa Saviot
ed19d19070
Merge branch 'master' into python_turtle
2018-12-17 15:49:46 +01:00
Léa Saviot
101370c507
[escher] Change ToolboxMessageTree constructors
...
To simplify ToolboxMessageTree cosntruction
2018-12-17 15:27:38 +01:00
Léa Saviot
62de89ceba
[apps/code] Fix 'blue', 'red', ... python command insertion
...
The 'blue' command would be stripped and become ''.
2018-12-17 14:25:31 +01:00
Léa Saviot
b3c11f2425
[apps/code] Put turtle module higher in Python toolbox
2018-12-17 13:58:13 +01:00
Léa Saviot
b058b023db
[apps/code] Add turtle functions in the toolbox catalog
2018-12-17 13:58:13 +01:00
Léa Saviot
8a3aa1ab08
[apps/code] Add turtle functions in th python toolbox
2018-12-17 11:57:40 +01:00
Léa Saviot
609740b0bd
[apps/code] Order catalog.universal.i18n
2018-12-17 10:31:20 +01:00
Léa Saviot
ce1cdaacc3
[apps/code] Fix console reloading that did not occur often enough
...
Scenario:
Write a script that prints "abc"
Open the console -> prints "abc"
Modify the script to print "ab"
Go back to the console -> "ab" not printed !
2018-12-12 11:15:50 +01:00
Léa Saviot
ddf361c1b1
[apps] Sandbox handles/absorbs only keyboard events (except Home, OnOff)
...
The sandbox prevented USB enumeration by absorbing the event.
2018-12-11 09:34:12 +01:00
Léa Saviot
cc3beb6014
[python/turtle] Turtle::reset() method
2018-12-06 17:26:43 +01:00
Léa Saviot
b0f2131dec
[apps/code] Fix variableBox crash
...
Respect the k_maxScriptNodesCount limit
2018-11-28 17:28:22 +01:00
Léa Saviot
2a089fe643
[apps] Share NameTooLong message
2018-11-27 12:09:36 +01:00
Léa Saviot
f3ab938481
[apps] Share and fix NameTaken message
2018-11-27 12:09:36 +01:00
Émilie Feral
55be86ef50
[escher] TableView::cellAtLocation should return nullptr if the cell is
...
invisible and therefore no view displays it.
Fix bug: add 4 functions, in the values table one cell is wrong as soon
as you edit an x value
2018-11-26 11:24:30 +01:00
Émilie Feral
916493a4d2
[apps] Reset (exam mode) delete all records at once
2018-11-23 12:04:10 +01:00
Émilie Feral
d59c836abd
[code] PythonToolbox: add 'eval' to the catalog
2018-11-23 12:04:09 +01:00
Émilie Feral
978766f2e4
[code] Use strlcpy instead of memcpy to avoid invalid read
2018-11-23 12:04:09 +01:00
Léa Saviot
a0e716c1ad
[apps/eschr] Rename textFieldDidHandleEvent parameter textSizeDidChange
2018-11-23 12:04:06 +01:00
Léa Saviot
d686199111
[code] Delete script when aborting edition with no default name
2018-11-23 12:04:05 +01: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
0f9d1db851
[apps/code] Fix break that should be a return
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
bea78aa3b1
[apps/escher] Invocation::Action returns a bool
2018-11-23 12:04:04 +01:00
Émilie Feral
932782bec4
[code] Load Variable box content only once in the ConsoleController (to
...
avoid memory exhaustion later)
2018-11-23 12:04:03 +01:00
Émilie Feral
ea59e651ee
[code] EditorController: save script before displaying the variable box
2018-11-23 12:04:03 +01:00
Émilie Feral
a4f7d83805
[code] Load Variable box content before compiling any other python code
...
to avoid memory exhaustion when displaying variable box
2018-11-23 12:04:03 +01:00
Émilie Feral
c7e001a01d
[code] ConsoleController: TextField handle any move event so escaping by going up needs to be handled in textFieldDidReceiveEvent
2018-11-23 12:04:03 +01:00
Émilie Feral
99054df77b
[code] Remove useless code: force edition on Var event is already
...
handled by TextField
2018-11-23 12:04:03 +01:00
Émilie Feral
0a823da78c
[escher] Variable box pop-up is handle as Toolbox pop-up by asking
...
InputEventHandlerDelegate
2018-11-23 12:04:03 +01:00
Émilie Feral
1c6573e8fe
[code] When script name edition abort, ask the storage for the previous
...
name
2018-11-23 12:04:03 +01:00
Émilie Feral
d61ee2857b
[escher] TextField: never flush the buffer when textField has only one
...
buffer
2018-11-23 12:04:03 +01:00
Émilie Feral
53e13368c3
[code] ScriptNameCell is responder only when editing
2018-11-23 12:04:03 +01:00
Émilie Feral
698332c355
[escher] InputTextDelegate and LayoutFieldDelegate don't inherit from
...
InputTextDelegate to avoid diamond inheritance
2018-11-23 12:04:03 +01:00
Émilie Feral
4070c754fe
[code] VariableBoxController inherits from NestedMenuController
2018-11-23 12:04:02 +01:00
Émilie Feral
7778c694d1
[escher] Create an InputEventHandlerDelegate that gives the toolbox to
...
be used by an InputEventHandler
2018-11-23 12:04:02 +01:00
Léa Saviot
71d8358722
[apps/escher/poincare] Change KDText::FontSize to KDFont
2018-11-23 12:04:02 +01:00
Émilie Feral
01e433a9f2
[escher] Clean Field and Input class hierarchy:
...
Class hierarchy:
- InputEventHandler
- TextInput
- EditableField derives from InputEventHandler
- LayoutField, TextField and ExpressioField derives from EditableField
- TextArea and TextField derives from TextInput
2018-11-23 12:04:02 +01:00