It's a matter of syntax, they both work fine.  Even the early Pascal widgets
used the syntax applied to most of the API standard widgets, but as the API
matured it shifted to a more OO style of construction.  Pascal spearheaded
allot of this.

In my opinion, this format ...

        function widget(id,x,y,w,h) {
                this.superClass=DynLayer;
                this.superClass(id,x,y,w,h);

is probably more eloquent since is clearly identifies the "superClass"
object that this particular widget is a child-class of.

Just my 2 "rocks" worth.

Ray

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Colin
Thompson
Sent: Saturday, May 12, 2001 1:00 AM
To: Dynapi-Help
Subject: [Dynapi-Help] correct format of widgets


Just a simple question,

I've noticed that the tutorials by Pascal use this format:

        function widget(id,x,y,w,h) {
                this.superClass=DynLayer
                this.superClass(id,x,y,w,h)

yet all the 'core' widgets use this.DynLayer. What is the difference between
the 2? is there a consequence of using one over the other?




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001


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

Reply via email to