似乎UnitImport程序可能以某种方式出现在cajScript/PascalScript的开发中,并且它可能隐藏了一些细节,这些细节将有助于您理解如何实现PascalScript应用程序。假设是这种情况,或者您希望在不使用导入器的情况下编写PascalScript应用程序,那么如何将这样的类合并到您的脚本环境中?
TQuery = Class(TObject)
private
oSQL: TSQLQuery;
FFirstCall: Boolean;
function ExecSQL: Integer;
function GetFields(iNdx: Integer): String;
function GetFieldNames(iNdx: Integer): String;
function GetFieldCount: Integer;
public
EOF: Boolean;
Constructor Create(Owner: TComponent);
Destructor Destroy;
property FieldCount: Integer Read GetFieldCount;
property FieldNames[iNdx: Integer]: String Read GetFieldNames;
property Fields[iNdx: Integer]: String Read GetFields;
procedure AddSQL(sSQL: String);
procedure ExecSQL;
function Fetch: Boolean;
end;我希望整理一些关于使用PascalScript的基本说明,以填补两个说明文档和新闻组留下的一些空白。
谢谢你的帮助。
发布于 2009-11-23 05:04:19
Unit Importer工具工作得很好,这个类看起来不会给它带来任何麻烦。我要做的是通过导入器运行类,并查看生成的导入代码。通过检查它,您可以看到一个好的类导入单元应该是什么样子,这将为您提供一个起点,以便您尝试了解类导入的工作原理。
https://stackoverflow.com/questions/1779752
复制相似问题