Not following default language

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.