TOracleScript amusing behaviour

al0

Member²
Hi,

the follwing code cause AV error on me.Lines.Assign call (me is TMemo).

Code:
var
 cl : TOracleScript;
begin
  os.connected:=true;
  cl := TOracleScript.Create(nil);
  cl.Lines.Text := 'alter procedure C compile;';
  me.Clear;
//  cl.Commands.Count;
  me.Lines.Assign(cl.Commands[0].Words);
end;
When commented line is uncommented code works fine.
 
Originally posted by al0:
Hi,

the follwing code cause AV error on me.Lines.Assign call (me is TMemo).

Code:
var
 cl : TOracleScript;
begin
  os.connected:=true;
  cl := TOracleScript.Create(nil);
  cl.Lines.Text := 'alter procedure C compile;';
  me.Clear;
//  cl.Commands.Count;
  me.Lines.Assign(cl.Commands[0].Words);
end;
When commented line is uncommented code works fine.
I can answer my question myself :p - accessing of Count property cause execution of undocumented (but public) procedure BuildCommands, so script text is separated into commands and their properties become available.
 
Back
Top