TWideStringList / TAdoQuery

Hi,

I'm trying to access TAdoQuery.sql.text property in PascalScripter (ver 6.1.1) and Delphi2007.
At runtime I receive error, unknown property text. code is
  q := tadoquery.create(nil);
  q.sql.text := 'select * from sometable';

also simplified  test like one bellow gives uknown method
  l:= TWideStringList.create;
  l.add('a');

I have a ap_widestrings in uses list and   AtLibraryList contains tatWideStringsLibrary
What's missing?

I cannot reproduce this here. A simple code like this, in Delphi 2007, runs fine ("OK" is displayed):


uses
  atScripter, ap_WideStrings;


procedure TForm1.Button1Click(Sender: TObject);
var
  S: TatScripter;
begin
  S := TatScripter.CReate(Self);
  S.AddLibrary(TatWideStringsLibrary);
  S.AddComponent(ADOQuery1);
  S.SourceCode.Clear;
  S.SourceCode.Add('ADOQuery1.SQl.Text := ''test''');
  S.SourceCode.Add('ShowMessage(''Ok'');');
  S.Execute;
end;

Can you check?

Thanks for reply,

That example worked. The problem was that I had    RegisterScripterLibrary(TatWideStringsLibrary, true) in my code. (It was also in initilazion of ap_widestrings). Changing it to addLibrary helped. Code was originally written with d7 / scripter 2.6, so there might have been some changes... :)


Keep in mind that RegisterScripterLibrary doesn't register the library directly into scripter like AddLibrary. It just makes scripter aware of it. To effectively use the library you must add "uses WideStrings" to your script.