uidesigner/com.nokia.sdt.component.symbian.test/data/modelUpdaterTest/script_updater.js
author timkelly
Fri, 21 May 2010 12:08:04 -0500
changeset 1386 ea54f91365dc
parent 0 fb279309251b
permissions -rw-r--r--
updated APIs after first review. Added comments to all API for proposed behaviour

function CModelUpdater() {
}

CModelUpdater.prototype.updateModel = function(instance, dataModel) {
	var newObject = dataModel.createNewComponentInstance(instance.parent.component);
	var command = dataModel.createAddNewComponentInstanceCommand(instance.EObject, newObject, 0);
	if (command.canExecute()) {
		command.execute();
	}
}