⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testingcase13.js

📁 《脚本驱动的应用软件开发方法与实践》源码
💻 JS
字号:
//*****************************************************************************
// A Practical Guide to Script-Driven Software Development
// Author: Qiming Lu                        Date: 5/1/2006
//*****************************************************************************

// Testing Case 13: dynamic properties (IDispatchEx)
Debugger.addBlankLine(1);
Debugger.trace("Testing Case 13", "dynamic properties (IDispatchEx)");

try
{
	var wheel1 = Application.car.createWheel("KUMHO", "red");
	wheel1.price = 500;
}
catch (e)
{
	Debugger.trace("Exception", e.message);
}

var wheel2 = Application.car.createDynamicWheel("KUMHO", "red");
Debugger.trace("Info", "The wheel's brand is " + wheel2.brand);
Debugger.trace("Info", "The wheel's color is " + wheel2.color);
Debugger.trace("Info", "The wheel's (original) price is " + wheel2.price);
wheel2.price = 500;
Debugger.trace("Info", "The wheel's (new) price is " + wheel2.price);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -