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 正确的识别到这些属性?
//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 正确的识别到这些属性?
解决方案 »
- DBGrid1如何对多选中的一个字段某几行求和
- 内存出错,如何可以根据'Access violation at address'的地址跟踪错误?
- 关于StringGrid背景颜色问题!
- 怎么才能实现把excel表格导入到access数据库中,而且字段名最好也一块导入,请问各位高手有没有什么办法?
- 一个关于ADO控件中的怪现象,请高手指点.
- 在delphi中如何控制把剪贴版中的内容写入到excel表中,并从指定单元格开始粘贴?
- 有一款独立报表软件,可与任何系统配合使用,带数据挖掘功能,谁有兴趣?
- 关于一个小汇总问题!
- 请问各位,出现如下的错误提示该怎样解决?
- Delphi编译器的ctrl+v 和 ctrl+c 都不好用了,怎么办?
- 类的使用
- delphi 内联汇编问题
官方演示程序可以正常运行
ShowMessage(ComboBox1.Items.Count);
同样无法执行
ShowMessage(ComboBox1.Items[0]); 难道 Scripter Studio 不支持这样深度对象识别?官方网站地址:
http://www.tmssoftware.com/scriptstudio.htm 使用 EXE Greatis IDE Form Designer Demo 在窗体上拉出 TComboBox 控件测试结果如上。
老外很负责回答很到位,清楚的给出了答案。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 的事情,也难免有点遗憾,不过问题最终得到解决。快乐中~~~~感谢楼上的兄弟积极提出建议,分数如数奉上.谢谢!