tonylukasavage / triple

REPL for Titanium
MIT License
96 stars 21 forks source link

.clear doesn't clear the command history #35

Closed skypanther closed 10 years ago

skypanther commented 10 years ago
≫ triple
[launching app]
> var win = Ti.UI.createWindow()
undefined
> win.backgroundColor = 'red'
'red'
> win.open();
undefined
> .clear
> win.open();
[ERROR] Script Error {
[ERROR]     backtrace = "#0 () at :0";
[ERROR]     line = 1;
[ERROR]     message = "Can't find variable: win";
[ERROR]     name = ReferenceError;
[ERROR]     sourceId = 250912608;
[ERROR] } 

> .save ./triple.txt

Open triple.txt and you'll see the three window commands. I would expect it to be empty. Maybe I misunderstand the purpose of the .clear command.

tonylukasavage commented 10 years ago

Yes, you're misunderstanding clear. It clears the execution context in the app. It has nothing to do with the command list in the REPL.