Scripter Studio 2.5 版本.程序代码:
    //ComboBox1 已经在窗体中建立,已引入 ap_Classes, ap_StdCtrls 单元
    //ComboBox1 为 Delphi VCL TComboBox
    atPascalScripter1.AddComponent(ComboBox1);脚本代码:
    //执行错误,错误信息:Unknown member identifier:'Count'.Source posiion 1,....
    ShowMessage(ComboBox1.Items.Count);    //执行错误,错误信息:Invalid array indexing for property 'Items'. Expected 0 dimensions. Source position 1,...
    ShowMessage(ComboBox1.Items[0]);请问如何让 atPascalScripter 正确的识别到这些属性?

解决方案 »

  1.   

    谢谢,楼上的回答。找到了一个 2.8 得,试试看。貌似他们官方网站上提供的一个 Demo 程序也有这个问题。
    官方演示程序可以正常运行
        ShowMessage(ComboBox1.Items.Count); 
    同样无法执行
        ShowMessage(ComboBox1.Items[0]); 难道 Scripter Studio 不支持这样深度对象识别?官方网站地址:
        http://www.tmssoftware.com/scriptstudio.htm    使用 EXE Greatis IDE Form Designer Demo 在窗体上拉出 TComboBox 控件测试结果如上。
      

  2.   

    问题解决了,给官方发了封邮件。
    老外很负责回答很到位,清楚的给出了答案。for the first problem, you must add ap_Classes unit and it will work. How are you importing ap_Classes? You must use AddLibrary(TatClassesLibrary) or add "uses Classes" in your script. That should be enough.About the second problem, scripter does not accept default properties, so you must use this:        ShowMessage(ComboBox1.Items.Strings[0]);again, ap_Classes must be loaded.哎,老外提供的说明文档资料不全面,文档中没有提到脚本中 AddLibary 和 use 的事情,也难免有点遗憾,不过问题最终得到解决。快乐中~~~~感谢楼上的兄弟积极提出建议,分数如数奉上.谢谢!