Update of /cvsroot/thyapi/thyapi/thyutils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20388/thyutils
Modified Files:
thycollection.js thydatasource.js
Log Message:
Commiting file additions and modification from SVN revision 1859 to 1860...
Changes made by rpereira on 2005-08-29 06:18:07 +0200 (Mon, 29 Aug 2005) corresponding to SVN revision 1860 with message:
Corrected bug 1262190 - drag is now on pointer origin
Index: thycollection.js
===================================================================
RCS file: /cvsroot/thyapi/thyapi/thyutils/thycollection.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** thycollection.js 23 Aug 2005 13:14:04 -0000 1.2
--- thycollection.js 29 Aug 2005 04:02:08 -0000 1.3
***************
*** 20,25 ****
* Class: thyCollection
*
! * This is the basic ThyAPI Collection Element. With it, one can hold a
! * collection of any Element.
*
*/
--- 20,26 ----
* Class: thyCollection
*
! * This is the basic ThyAPI Collection Element. With it, one can hold a
! * collection of any Element, each one with a corresponding name and
! * index.
*
*/
***************
*** 110,114 ****
p.populate = function (data)
{
! if (data == null) throw({result: 'Invalid Data', location: 'thyCollection.populate'});
if (typeof(data) != 'object') data[this.defaultName+this.indexCount++] = data;
--- 111,116 ----
p.populate = function (data)
{
! //if (data == null) throw({result: 'Invalid Data', location: 'thyCollection.populate'});
! if (data == null) return;
if (typeof(data) != 'object') data[this.defaultName+this.indexCount++] = data;
***************
*** 157,164 ****
p.add = function (elm, name, index)
{
if (name && this.named[name] &&
(this.named[name] == elm || (this.getElementIndex(elm) == index && index != null))) return;
! if (this.named[name])
{
var oldIndex = this.getElementIndex(this.named[name]);
--- 159,168 ----
p.add = function (elm, name, index)
{
+ if (elm == null) return;
+
if (name && this.named[name] &&
(this.named[name] == elm || (this.getElementIndex(elm) == index && index != null))) return;
! if (this.named[name] != null)
{
var oldIndex = this.getElementIndex(this.named[name]);
Index: thydatasource.js
===================================================================
RCS file: /cvsroot/thyapi/thyapi/thyutils/thydatasource.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** thydatasource.js 23 Aug 2005 13:14:04 -0000 1.2
--- thydatasource.js 29 Aug 2005 04:02:08 -0000 1.3
***************
*** 334,342 ****
if (event[i] == 'read' && !(obj.populate && typeof(obj.populate) == 'function'))
{
! throw({result: 'No populate methods to link on read', location: 'thyDataSource.link'});
}
else if (event[i] == 'write' && !(obj.sweepOut && typeof(obj.sweepOut) == 'function'))
{
! throw({result: 'No populate methods to link on read', location: 'thyDataSource.link'});
}
--- 334,342 ----
if (event[i] == 'read' && !(obj.populate && typeof(obj.populate) == 'function'))
{
! throw({result: 'No populate method to link on read', location: 'thyDataSource.link'});
}
else if (event[i] == 'write' && !(obj.sweepOut && typeof(obj.sweepOut) == 'function'))
{
! throw({result: 'No sweepOut method to link on write', location: 'thyDataSource.link'});
}
|