function ConsoleEntry::eval()
{
%text = ConsoleEntry.getValue();
echo("==>" @ %text);
eval(%text);
ConsoleEntry.setValue("");
}
It crashes because it's creating an infinite loop, by evaling "ConsoleEntry::Eval();" before it clears what's in ConsoleEntry.
This is not what crash(); does, and it not what causes it to crash, just what happens when you manually call ConsoleEntry::Eval in the console
Try switching around those two lines, putting it in an add-on (Or just putting it all into one line and pasting it into console), and putting "ConsoleEntry::Eval()" in the console. It won't crash.
function ConsoleEntry::eval()
{
%text = ConsoleEntry.getValue();
echo("==>" @ %text);
ConsoleEntry.setValue("");
eval(%text);
}
or
function ConsoleEntry::eval(){ %text = ConsoleEntry.getValue(); echo("==>" @ %text); ConsoleEntry.setValue(""); eval(%text); }