Not following default language

Hi, if you create an TatScripter object, set DefaultLanguage to slBasic, and then load a basic script (via SourceCode property), it always fails to compile. It's expecting it to be Pascal even though the default language has changed.

The DefaultLanguage changes new scripts added to the component, but does not change existing scripts (including CurrentScript). Do this:


Scripter.DefaultLanguage := slBasic;
Scripter.Scripts.Clear;
Scripter.CurrentScript := Scripter.Scripts.Add;

then using SourceCode will work.