Program should clear when we enter a Challenge
Closed this issue · 3 comments
Arguable whether or not this is a bug but it seems pretty clear to me that it should clear the program. Note that naively clearing the program when we enter challenge mode doesn't work, since it could be that we're coming from RunMode, and we obviously don't want to delete someone's program after it's finished running.
We should probably also save the state of the text when we leave free design mode and restore it when someone leaves the challenge and goes back to free design.
ChallengeUI already stores the previous mode, will have a crack when i get back from a tute
On Tuesday, 7 May 2013 at 14:06, rgossiaux wrote:
Arguable whether or not this is a bug but it seems pretty clear to me that it should clear the program. Note that naively clearing the program when we enter challenge mode doesn't work, since it could be that we're coming from RunMode, and we obviously don't want to delete someone's program after it's finished running.
We should probably also save the state of the text when we leave free design mode and restore it when someone leaves the challenge and goes back to free design.—
Reply to this email directly or view it on GitHub (#50).
This is good but we should probably add two more things: 1) the program should probably be cleared when switching between challenges (using the next challenge button), 2) when we clear the text going from free design to challenge mode, we might want to restore it when returning to free design mode (this one is more debatable).
just working on that now.. also the output needs to clear when we switch challenges (try doing the input/output challenge then moving to the next one)