The double braces indicates an empty object literal.  You could for instance
make an object with properties and methods by doing the following:

myObj = {
        x : 1;
        y : 2;
        getSum : function() {
                return x + y;
}
}

Then you use it just like any other object.

myObj.y = 3;
ret = myObj.getSum();

Using this method you don't have to declare the object then instantiate it.
In my above example, "myObj" is the instantiated object.

Hope this helps. =)

-- Matthew Shirey

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jack_Speranza
Sent: Thursday, December 28, 2000 2:21 PM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] Real basic question...

Hi gang --
        This is not really a DynAPI related question, more general
JavaScript. In any event, it relates to my continuing efforts to understand
the DynAPI way of life, so hopefully somebody out there can show me the
light ;-)   As I wade my way through the various DynAPI files, I see both
double brackets "[]" and double braces "{}" being used.  For example,
this.children = [] and this.doc = {}.  I understand the [] represents an
empty array literal, but what do the double empty bracers represent?  Thanks
in advance for the tutorial...

Yet another DynAPI guru wannabe...


******************************
Jack Speranza
Web Developer
Gryphon Networks
781. 255.0444 x129
[EMAIL PROTECTED]
www.gryphonnetworks.com




_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-help

Reply via email to