uidesigner/com.nokia.carbide.cpp.uiq.components/components/containerLibrary.js
author tzelaw
Tue, 14 Apr 2009 15:03:19 -0500
changeset 94 d74b720418db
parent 2 d760517a8095
permissions -rw-r--r--
Test framework support: Ask debugger to remember DebugTarget so test framework can use it to setup test framework related utility. With this we can use the DebugUI way of launching while keeping test framework functionality
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
cawthron
parents:
diff changeset
     1
/*
cawthron
parents:
diff changeset
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
cawthron
parents:
diff changeset
     3
* All rights reserved.
cawthron
parents:
diff changeset
     4
* This component and the accompanying materials are made available
cawthron
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
cawthron
parents:
diff changeset
     6
* which accompanies this distribution, and is available
cawthron
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
cawthron
parents:
diff changeset
     8
*
cawthron
parents:
diff changeset
     9
* Initial Contributors:
cawthron
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
cawthron
parents:
diff changeset
    11
*
cawthron
parents:
diff changeset
    12
* Contributors:
cawthron
parents:
diff changeset
    13
*
cawthron
parents:
diff changeset
    14
* Description: 
cawthron
parents:
diff changeset
    15
*
cawthron
parents:
diff changeset
    16
*/
cawthron
parents:
diff changeset
    17
cawthron
parents:
diff changeset
    18
cawthron
parents:
diff changeset
    19
include("messageLibrary.js")
cawthron
parents:
diff changeset
    20
cawthron
parents:
diff changeset
    21
var STATUS_PANE_ID = "com.nokia.sdt.series60.StatusPane";
cawthron
parents:
diff changeset
    22
cawthron
parents:
diff changeset
    23
function setBounds(container, rect) {
cawthron
parents:
diff changeset
    24
	if (container.properties.location.x != rect.x
cawthron
parents:
diff changeset
    25
	|| container.properties.location.y != rect.y) {
cawthron
parents:
diff changeset
    26
		//println("Setting location for " + container.instanceName + " to " + rect.x + "," + rect.y);
cawthron
parents:
diff changeset
    27
		container.properties.location.x = rect.x;
cawthron
parents:
diff changeset
    28
		container.properties.location.y = rect.y;
cawthron
parents:
diff changeset
    29
	}
cawthron
parents:
diff changeset
    30
	if (container.properties.size.width != rect.width
cawthron
parents:
diff changeset
    31
	|| container.properties.size.height != rect.height) {
cawthron
parents:
diff changeset
    32
		//println("Setting size for " + container.instanceName + " to " + rect.width + "," + rect.height);
cawthron
parents:
diff changeset
    33
		container.properties.size.width = rect.width;
cawthron
parents:
diff changeset
    34
		container.properties.size.height = rect.height;
cawthron
parents:
diff changeset
    35
	}
cawthron
parents:
diff changeset
    36
}
cawthron
parents:
diff changeset
    37
cawthron
parents:
diff changeset
    38
function doScreenLayout(container, laf) {
cawthron
parents:
diff changeset
    39
	var screenWidth = container.properties.size.width;
cawthron
parents:
diff changeset
    40
	var screenHeight = container.properties.size.height;
cawthron
parents:
diff changeset
    41
	var children = container.children;
cawthron
parents:
diff changeset
    42
	
cawthron
parents:
diff changeset
    43
	var statusArea = getStatusPane(children);
cawthron
parents:
diff changeset
    44
	if (statusArea != null) {
cawthron
parents:
diff changeset
    45
		setBounds(statusArea, laf.getRectangle("status.pane.bounds"));
cawthron
parents:
diff changeset
    46
	}
cawthron
parents:
diff changeset
    47
	
cawthron
parents:
diff changeset
    48
	var cba = getControlPane(children);
cawthron
parents:
diff changeset
    49
	if (cba != null) {
cawthron
parents:
diff changeset
    50
		setBounds(cba, laf.getRectangle("control.pane.bounds"));
cawthron
parents:
diff changeset
    51
	}
cawthron
parents:
diff changeset
    52
cawthron
parents:
diff changeset
    53
	var contents = getContents(children);
cawthron
parents:
diff changeset
    54
	if (contents != null) {
cawthron
parents:
diff changeset
    55
		setBounds(contents, laf.getRectangle("content.pane.bounds"));
cawthron
parents:
diff changeset
    56
	}
cawthron
parents:
diff changeset
    57
}
cawthron
parents:
diff changeset
    58
cawthron
parents:
diff changeset
    59
function getControlPane(children) {
cawthron
parents:
diff changeset
    60
    return findImmediateChildByComponentID(children, "com.nokia.sdt.series60.CBABase");
cawthron
parents:
diff changeset
    61
}
cawthron
parents:
diff changeset
    62
cawthron
parents:
diff changeset
    63
function getStatusPane(children) {
cawthron
parents:
diff changeset
    64
    return findImmediateChildByComponentID(children, "com.nokia.sdt.series60.StatusPane");
cawthron
parents:
diff changeset
    65
}
cawthron
parents:
diff changeset
    66
cawthron
parents:
diff changeset
    67
function getNaviPaneContent(children) {
cawthron
parents:
diff changeset
    68
	return findImmediateChildByAttributeValue(children, "is-navipane-content", "true");
cawthron
parents:
diff changeset
    69
}
cawthron
parents:
diff changeset
    70
cawthron
parents:
diff changeset
    71
function getStatusPaneContent(children, componentIdArg) {
cawthron
parents:
diff changeset
    72
	return findImmediateChildByComponentID(children, componentIdArg);
cawthron
parents:
diff changeset
    73
}
cawthron
parents:
diff changeset
    74
cawthron
parents:
diff changeset
    75
cawthron
parents:
diff changeset
    76
function getContents(children) {
cawthron
parents:
diff changeset
    77
	return findImmediateChildByAttributeValue(children, "is-top-level-content-container", "true");
cawthron
parents:
diff changeset
    78
}
cawthron
parents:
diff changeset
    79
cawthron
parents:
diff changeset
    80
function findImmediateChildByAttributeValue(children, attrName, attrValue) {
cawthron
parents:
diff changeset
    81
	var result = null;
cawthron
parents:
diff changeset
    82
	if (children != null) {
cawthron
parents:
diff changeset
    83
		for (var i in children) {
cawthron
parents:
diff changeset
    84
			var child = children[i];
cawthron
parents:
diff changeset
    85
			if (child.component != null && child.component.attributes != null && 
cawthron
parents:
diff changeset
    86
			    child.component.attributes[attrName] == attrValue) {
cawthron
parents:
diff changeset
    87
				result = child;
cawthron
parents:
diff changeset
    88
				break;
cawthron
parents:
diff changeset
    89
			}
cawthron
parents:
diff changeset
    90
		}
cawthron
parents:
diff changeset
    91
	}
cawthron
parents:
diff changeset
    92
	return result;
cawthron
parents:
diff changeset
    93
}
cawthron
parents:
diff changeset
    94
cawthron
parents:
diff changeset
    95
function findImmediateChildByComponentID(children, componentID) {
cawthron
parents:
diff changeset
    96
    var result = null;
cawthron
parents:
diff changeset
    97
	for (var i in children) {
cawthron
parents:
diff changeset
    98
		var child = children[i];
cawthron
parents:
diff changeset
    99
		if (child.component != null && child.component.isOfType(componentID)) {
cawthron
parents:
diff changeset
   100
			result = child;
cawthron
parents:
diff changeset
   101
			break;
cawthron
parents:
diff changeset
   102
		}
cawthron
parents:
diff changeset
   103
	}
cawthron
parents:
diff changeset
   104
	return result;
cawthron
parents:
diff changeset
   105
}
cawthron
parents:
diff changeset
   106
cawthron
parents:
diff changeset
   107
function hasAttributeValue(attributesArg, attrName, attrValue) {
cawthron
parents:
diff changeset
   108
	return attributesArg[attrName] == attrValue;
cawthron
parents:
diff changeset
   109
}
cawthron
parents:
diff changeset
   110
cawthron
parents:
diff changeset
   111
function hasTopLevelContentContainerAttribute(attributesArg) {
cawthron
parents:
diff changeset
   112
	return hasAttributeValue(attributesArg, "is-top-level-content-container", "true");
cawthron
parents:
diff changeset
   113
}
cawthron
parents:
diff changeset
   114
cawthron
parents:
diff changeset
   115
function hasStatusPaneContentAttribute(attributesArg) {
cawthron
parents:
diff changeset
   116
	return hasAttributeValue(attributesArg, "is-status-pane-content", "true");
cawthron
parents:
diff changeset
   117
}
cawthron
parents:
diff changeset
   118
cawthron
parents:
diff changeset
   119
function buildSimpleContainmentErrorStatus(errorString, params) {
cawthron
parents:
diff changeset
   120
	return buildSimpleErrorStatus(errorString, params);
cawthron
parents:
diff changeset
   121
}
cawthron
parents:
diff changeset
   122
cawthron
parents:
diff changeset
   123
function buildMultipleContainmentErrorStatus(header, errorString, params, status) {
cawthron
parents:
diff changeset
   124
	return buildMultipleErrorStatus(header, errorString, params, status);
cawthron
parents:
diff changeset
   125
}
cawthron
parents:
diff changeset
   126
cawthron
parents:
diff changeset
   127
function isControlPane(component) {
cawthron
parents:
diff changeset
   128
	return component.isOfType("com.nokia.sdt.series60.CBABase");
cawthron
parents:
diff changeset
   129
}
cawthron
parents:
diff changeset
   130
cawthron
parents:
diff changeset
   131
function isStatusPaneId(componentIdArg) {
cawthron
parents:
diff changeset
   132
	return componentIdArg == STATUS_PANE_ID;
cawthron
parents:
diff changeset
   133
}
cawthron
parents:
diff changeset
   134
cawthron
parents:
diff changeset
   135
function isDesignRef(component) {
cawthron
parents:
diff changeset
   136
	return component.isOfType("com.nokia.sdt.series60.DesignReference");
cawthron
parents:
diff changeset
   137
}
cawthron
parents:
diff changeset
   138
cawthron
parents:
diff changeset
   139
function getLayoutChildren(children) {
cawthron
parents:
diff changeset
   140
	var result = [];
cawthron
parents:
diff changeset
   141
	var idx = 0;
cawthron
parents:
diff changeset
   142
	if (children != null) {
cawthron
parents:
diff changeset
   143
		for (var i in children) {
cawthron
parents:
diff changeset
   144
			var child = children[i];
cawthron
parents:
diff changeset
   145
			if (child.component != null && child.component.attributes != null 
cawthron
parents:
diff changeset
   146
				&& child.component.attributes["is-non-layout-object"] != "true"
cawthron
parents:
diff changeset
   147
				&& child.component.attributes["is-non-transient-object"] != "true") {
cawthron
parents:
diff changeset
   148
				result[idx++] = child;
cawthron
parents:
diff changeset
   149
			}
cawthron
parents:
diff changeset
   150
		}
cawthron
parents:
diff changeset
   151
	}
cawthron
parents:
diff changeset
   152
	return result;
cawthron
parents:
diff changeset
   153
}
cawthron
parents:
diff changeset
   154
cawthron
parents:
diff changeset
   155
function allowsCBAInParent(instance) {
cawthron
parents:
diff changeset
   156
	return instance.attributes["allow-cba-in-parent"] == "true";
cawthron
parents:
diff changeset
   157
}
cawthron
parents:
diff changeset
   158
cawthron
parents:
diff changeset
   159
function getInstanceFromChildName(children, name) {
cawthron
parents:
diff changeset
   160
	if (children != null) {
cawthron
parents:
diff changeset
   161
		for (i in children) {
cawthron
parents:
diff changeset
   162
			if (children[i].name == name) {
cawthron
parents:
diff changeset
   163
				return children[i];
cawthron
parents:
diff changeset
   164
			}
cawthron
parents:
diff changeset
   165
		}
cawthron
parents:
diff changeset
   166
	}
cawthron
parents:
diff changeset
   167
	
cawthron
parents:
diff changeset
   168
	return null;
cawthron
parents:
diff changeset
   169
}
cawthron
parents:
diff changeset
   170
cawthron
parents:
diff changeset
   171
cawthron
parents:
diff changeset
   172
/**
cawthron
parents:
diff changeset
   173
 *	Find a child of type CAknForm
cawthron
parents:
diff changeset
   174
 */
cawthron
parents:
diff changeset
   175
function findAknFormChild(children) {
cawthron
parents:
diff changeset
   176
    return findImmediateChildByComponentID(children, "com.nokia.sdt.series60.CAknForm");
cawthron
parents:
diff changeset
   177
}
cawthron
parents:
diff changeset
   178
cawthron
parents:
diff changeset
   179
/**
cawthron
parents:
diff changeset
   180
 *	Iterate children to find the one with exitsApp property and return property value
cawthron
parents:
diff changeset
   181
 */
cawthron
parents:
diff changeset
   182
function childWantsExitBehavior(children) {
cawthron
parents:
diff changeset
   183
	for (var i in children) {
cawthron
parents:
diff changeset
   184
		if (children[i].isInstanceOf("com.nokia.sdt.series60.ContainerBase")) {
cawthron
parents:
diff changeset
   185
			return children[i].properties.exitsApp;
cawthron
parents:
diff changeset
   186
		}
cawthron
parents:
diff changeset
   187
	}
cawthron
parents:
diff changeset
   188
	
cawthron
parents:
diff changeset
   189
	return false;
cawthron
parents:
diff changeset
   190
}
cawthron
parents:
diff changeset
   191
cawthron
parents:
diff changeset
   192
cawthron
parents:
diff changeset
   193
function findNaviTabs(appUiInstance) {
cawthron
parents:
diff changeset
   194
	var statusPane = findImmediateChildByComponentID(appUiInstance.children, "com.nokia.sdt.series60.StatusPane");
cawthron
parents:
diff changeset
   195
	if (statusPane != null) {
cawthron
parents:
diff changeset
   196
		var naviTabs = findImmediateChildByComponentID(statusPane.children, "com.nokia.sdt.series60.NaviTabs");
cawthron
parents:
diff changeset
   197
		return naviTabs;
cawthron
parents:
diff changeset
   198
	}
cawthron
parents:
diff changeset
   199
	
cawthron
parents:
diff changeset
   200
	return null;
cawthron
parents:
diff changeset
   201
}
cawthron
parents:
diff changeset
   202
cawthron
parents:
diff changeset
   203
function hasNaviTabs(appUiInstance) {
cawthron
parents:
diff changeset
   204
	return findNaviTabs(appUiInstance) != null;
cawthron
parents:
diff changeset
   205
}
cawthron
parents:
diff changeset
   206
cawthron
parents:
diff changeset
   207
/**
cawthron
parents:
diff changeset
   208
 *	Get the view UID enumerator, adding the generating #include if necessary (for use from views)
cawthron
parents:
diff changeset
   209
 */
cawthron
parents:
diff changeset
   210
function getViewUidConstant(instance) {
cawthron
parents:
diff changeset
   211
	// the algorithm can deal with either CAknView or AvkonViewReference
cawthron
parents:
diff changeset
   212
	var name = Engine.queryEnumeratorForAlgorithm(instance, ".", 
cawthron
parents:
diff changeset
   213
		"com.nokia.sdt.component.symbian.NAME_ALG_VIEW_UID");
cawthron
parents:
diff changeset
   214
	return name;
cawthron
parents:
diff changeset
   215
}
cawthron
parents:
diff changeset
   216
cawthron
parents:
diff changeset
   217
/**
cawthron
parents:
diff changeset
   218
 *	Find or create the view UID enumerator (for use from appui)
cawthron
parents:
diff changeset
   219
 */
cawthron
parents:
diff changeset
   220
function findOrCreateViewUidConstant(instance) {
cawthron
parents:
diff changeset
   221
	// the algorithm can deal with either CAknView or AvkonViewReference
cawthron
parents:
diff changeset
   222
	return Engine.findOrCreateEnumeratorForAlgorithm(instance, ".", 
cawthron
parents:
diff changeset
   223
		"com.nokia.sdt.component.symbian.NAME_ALG_VIEW_UID");
cawthron
parents:
diff changeset
   224
}
cawthron
parents:
diff changeset
   225
cawthron
parents:
diff changeset
   226
/**
cawthron
parents:
diff changeset
   227
 *	Get the name of the project's HRH file (which contains view UID enums)
cawthron
parents:
diff changeset
   228
 */
cawthron
parents:
diff changeset
   229
function getProjectHrhFile() {
cawthron
parents:
diff changeset
   230
	return getProjectName() + ".hrh";
cawthron
parents:
diff changeset
   231
}
cawthron
parents:
diff changeset
   232
cawthron
parents:
diff changeset
   233
/**
cawthron
parents:
diff changeset
   234
 *	Get the name of the project's HRH file (which contains view UID enums)
cawthron
parents:
diff changeset
   235
 */
cawthron
parents:
diff changeset
   236
function includeProjectHrhFile(contribs) {
cawthron
parents:
diff changeset
   237
	var mycontrib = Engine.createContributionForPhase("MainUserIncludes")
cawthron
parents:
diff changeset
   238
	mycontrib.setText("#include \"" + getProjectHrhFile() + "\"\n");
cawthron
parents:
diff changeset
   239
	contribs.add(mycontrib);
cawthron
parents:
diff changeset
   240
}
cawthron
parents:
diff changeset
   241
cawthron
parents:
diff changeset
   242
/**
cawthron
parents:
diff changeset
   243
 *	Set up query containment based on an attribute in potential children.
cawthron
parents:
diff changeset
   244
 *
cawthron
parents:
diff changeset
   245
 *	@param prototype the prototype to add IQueryContainment to.
cawthron
parents:
diff changeset
   246
 *	The prototype must implement this functions:
cawthron
parents:
diff changeset
   247
 *	<p>
cawthron
parents:
diff changeset
   248
 *	<li>
cawthron
parents:
diff changeset
   249
 *		getAllowedAttribute(): return the attribute string for allowed children
cawthron
parents:
diff changeset
   250
 *
cawthron
parents:
diff changeset
   251
 *	The component must define a string with ID "generalContainmentError"
cawthron
parents:
diff changeset
   252
 * 	that takes a single argument for the type of component: e.g.,
cawthron
parents:
diff changeset
   253
 *	"A <container_type_name> can''t contain objects of type ''{0}''."
cawthron
parents:
diff changeset
   254
 */
cawthron
parents:
diff changeset
   255
function setupAttributeBasedQueryContainment(prototype) {
cawthron
parents:
diff changeset
   256
	var origCanContainComponent = null;
cawthron
parents:
diff changeset
   257
	if ("canContainComponent" in prototype)
cawthron
parents:
diff changeset
   258
		origCanContainComponent = prototype.canContainComponent;
cawthron
parents:
diff changeset
   259
	prototype.canContainComponent = function(instance, otherComponent) {
cawthron
parents:
diff changeset
   260
		var status = null;
cawthron
parents:
diff changeset
   261
		if (origCanContainComponent != null) {
cawthron
parents:
diff changeset
   262
			status = origCanContainComponent(instance, otherComponent);
cawthron
parents:
diff changeset
   263
		}
cawthron
parents:
diff changeset
   264
		var attrName = prototype.getAllowedAttribute();
cawthron
parents:
diff changeset
   265
		if (!hasAttributeValue(otherComponent.attributes, attrName, "true"))
cawthron
parents:
diff changeset
   266
			if (status != null)
cawthron
parents:
diff changeset
   267
				return buildMultipleContainmentErrorStatus(
cawthron
parents:
diff changeset
   268
					lookupString("containmentErrorHeader"),
cawthron
parents:
diff changeset
   269
					lookupString("generalContainmentError"), 
cawthron
parents:
diff changeset
   270
					new Array( otherComponent.friendlyName ), status);
cawthron
parents:
diff changeset
   271
			else
cawthron
parents:
diff changeset
   272
				return buildSimpleContainmentErrorStatus(
cawthron
parents:
diff changeset
   273
					lookupString("generalContainmentError"), 
cawthron
parents:
diff changeset
   274
					new Array( otherComponent.friendlyName ));
cawthron
parents:
diff changeset
   275
			
cawthron
parents:
diff changeset
   276
		return status;
cawthron
parents:
diff changeset
   277
	}
cawthron
parents:
diff changeset
   278
cawthron
parents:
diff changeset
   279
	var origCanContainChild = null;
cawthron
parents:
diff changeset
   280
	if ("canContainChild" in prototype)
cawthron
parents:
diff changeset
   281
		origCanContainChild = prototype.canContainChild;
cawthron
parents:
diff changeset
   282
	prototype.canContainChild = function(instance, child) {
cawthron
parents:
diff changeset
   283
		var status = null;
cawthron
parents:
diff changeset
   284
		if (origCanContainChild != null) {
cawthron
parents:
diff changeset
   285
			status = origCanContainChild(instance, child);
cawthron
parents:
diff changeset
   286
		}
cawthron
parents:
diff changeset
   287
		var attrName = prototype.getAllowedAttribute();
cawthron
parents:
diff changeset
   288
		if (!hasAttributeValue(child.component.attributes, attrName, "true"))
cawthron
parents:
diff changeset
   289
			if (status != null)
cawthron
parents:
diff changeset
   290
				return buildMultipleContainmentErrorStatus(
cawthron
parents:
diff changeset
   291
					lookupString("containmentErrorHeader"),
cawthron
parents:
diff changeset
   292
					lookupString("generalContainmentError"), 
cawthron
parents:
diff changeset
   293
					new Array( otherComponent.friendlyName ), status);
cawthron
parents:
diff changeset
   294
			else
cawthron
parents:
diff changeset
   295
				return buildSimpleContainmentErrorStatus(
cawthron
parents:
diff changeset
   296
					lookupString("generalContainmentError"), 
cawthron
parents:
diff changeset
   297
					new Array( child.component.friendlyName ));
cawthron
parents:
diff changeset
   298
		
cawthron
parents:
diff changeset
   299
		return status;
cawthron
parents:
diff changeset
   300
	}
cawthron
parents:
diff changeset
   301
cawthron
parents:
diff changeset
   302
	var origCanRemoveChild = null;
cawthron
parents:
diff changeset
   303
	if ("canRemoveChild" in prototype)
cawthron
parents:
diff changeset
   304
		origCanRemoveChild = prototype.canRemoveChild;
cawthron
parents:
diff changeset
   305
	prototype.canRemoveChild = function(instance, child) {
cawthron
parents:
diff changeset
   306
		if (origCanRemoveChild != null) {
cawthron
parents:
diff changeset
   307
			return origCanRemoveChild(instance, child);
cawthron
parents:
diff changeset
   308
		}
cawthron
parents:
diff changeset
   309
		return true; // everything can be removed
cawthron
parents:
diff changeset
   310
	}
cawthron
parents:
diff changeset
   311
cawthron
parents:
diff changeset
   312
	var origIsValidComponentInPalette = null;
cawthron
parents:
diff changeset
   313
	if ("isValidComponentInPalette" in prototype)
cawthron
parents:
diff changeset
   314
		origIsValidComponentInPalette = prototype.isValidComponentInPalette;
cawthron
parents:
diff changeset
   315
	prototype.isValidComponentInPalette = function(instance, otherComponent) {
cawthron
parents:
diff changeset
   316
		if (origIsValidComponentInPalette != null) {
cawthron
parents:
diff changeset
   317
			var result = origIsValidComponentInPalette(instance, otherComponent);
cawthron
parents:
diff changeset
   318
			if (!result)
cawthron
parents:
diff changeset
   319
				return result;
cawthron
parents:
diff changeset
   320
		}
cawthron
parents:
diff changeset
   321
		var attrName = prototype.getAllowedAttribute();
cawthron
parents:
diff changeset
   322
		return hasAttributeValue(otherComponent.attributes, attrName, "true");
cawthron
parents:
diff changeset
   323
	}
cawthron
parents:
diff changeset
   324
}
cawthron
parents:
diff changeset
   325
cawthron
parents:
diff changeset
   326
function countImmediateChildrenWithAttributeValue(children, attrName, attrValue) {
cawthron
parents:
diff changeset
   327
	var result = 0;
cawthron
parents:
diff changeset
   328
	if (children != null) {
cawthron
parents:
diff changeset
   329
		for (var i in children) {
cawthron
parents:
diff changeset
   330
			var child = children[i];
cawthron
parents:
diff changeset
   331
			if (child.component != null && child.component.attributes != null && 
cawthron
parents:
diff changeset
   332
			    child.component.attributes[attrName] == attrValue) {
cawthron
parents:
diff changeset
   333
				result++;
cawthron
parents:
diff changeset
   334
			}
cawthron
parents:
diff changeset
   335
		}
cawthron
parents:
diff changeset
   336
	}
cawthron
parents:
diff changeset
   337
	return result;
cawthron
parents:
diff changeset
   338
}
cawthron
parents:
diff changeset
   339
cawthron
parents:
diff changeset
   340
function isAvkonView(instance) {
cawthron
parents:
diff changeset
   341
	return (instance != null && instance.componentId == "com.nokia.sdt.series60.CAknView");
cawthron
parents:
diff changeset
   342
}