Update of /cvsroot/thyapi/thyapi/thyutils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12239/thyutils
Modified Files:
thycollection.js thyxmlrpcprotocol.js
Log Message:
Commiting file additions and modification from SVN revision 1910 to 1911...
Changes made by rpereira on 2005-09-08 17:13:52 +0200 (Thu, 08 Sep 2005) corresponding to SVN revision 1911 with message:
Updated documentation
Index: thycollection.js
===================================================================
RCS file: /cvsroot/thyapi/thyapi/thyutils/thycollection.js,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** thycollection.js 1 Sep 2005 18:15:38 -0000 1.5
--- thycollection.js 8 Sep 2005 14:59:40 -0000 1.6
***************
*** 374,378 ****
p.getElementByIndex = function (index)
{
! if (typeof(index) == 'object')
{
if (!index.length) return [];
--- 374,382 ----
p.getElementByIndex = function (index)
{
! if (index == null)
! {
! return null;
! }
! else if (typeof(index) == 'object')
{
if (!index.length) return [];
***************
*** 407,411 ****
p.getElementByName = function (name)
{
! if (typeof(name) == 'object')
{
if (!name.length) return [];
--- 411,419 ----
p.getElementByName = function (name)
{
! if (name == null)
! {
! return null;
! }
! else if (typeof(name) == 'object')
{
if (!name.length) return [];
Index: thyxmlrpcprotocol.js
===================================================================
RCS file: /cvsroot/thyapi/thyapi/thyutils/thyxmlrpcprotocol.js,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** thyxmlrpcprotocol.js 1 Sep 2005 18:15:38 -0000 1.4
--- thyxmlrpcprotocol.js 8 Sep 2005 14:59:40 -0000 1.5
***************
*** 263,272 ****
switch (childNode.nodeName)
{
! case 'struct': return this._decodeStruct(childNode);
! case 'array' : return this._decodeArray(childNode);
case 'int':
case 'i4':
! case 'double': return this._decodeNumber(childNode);
! case 'string': return this._decodeString(childNode);
default: return null;
}
--- 263,273 ----
switch (childNode.nodeName)
{
! case 'struct': return this._decodeStruct(childNode);
! case 'array' : return this._decodeArray(childNode);
case 'int':
case 'i4':
! case 'double': return this._decodeNumber(childNode);
! case 'string': return this._decodeString(childNode);
! case 'boolean': return this._decodeBoolean(childNode);
default: return null;
}
***************
*** 373,376 ****
--- 374,395 ----
/**
+ * Method: _decodeBoolean
+ *
+ * Parses <boolean> elements
+ *
+ */
+ p._decodeBoolean = function (node)
+ {
+ if (!node.firstChild) return null;
+
+ if (node.firstChild.nodeValue == '0')
+ {
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
* Method: _processParameter
*
|