|
From: Bart B. <ba...@ho...> - 2001-02-07 11:49:06
|
Which SuperClass are you talking about? Brandon Myers SuperClass? I myself am developing a revamp of that SuperClass, which will enable = class-based OOP (with a lot of basic OO concepts supported, such as = encapsulation, types and what have you). I am not quite finished with it though, still want to get error handling = in, but when I'm done I will release it opensource. It will truly be an amazing tool for building real class libraries in = Javascript, much in the vein of Java. -----Ursprungligt meddelande----- Fr=E5n: Michael Pemberton <mp...@ph...> Till: dyn...@li... = <dyn...@li...> Datum: den 6 februari 2001 15:35 =C4mne: [Dynapi-Dev] SuperClass >Does anyone have a copy of the code for this? example? documentation? >-- >Michael Pemberton >mp...@ph... >ICQ: 12107010 > > > >_______________________________________________ >Dynapi-Dev mailing list >Dyn...@li... >http://lists.sourceforge.net/lists/listinfo/dynapi-dev > |
|
From: Bart B. <ba...@ho...> - 2001-02-07 22:32:19
|
I'm not really comfortable with doing that just yet....
Wanna get it right first.. and I'm redoing stuff as I write...so
I will eventually release it though... (within a month , I think)
I can tell you that it is pretty complex, however.
A LOT more complex and featurepacked than anything that I've seen =
before...
just to blow my own horn ;)
This is an example of how Classes will look...=20
function HTMLElement(name,attr,text,tagend){
if(!isValStr(name)) return alert("HTMLElement syntax error! No element =
name.") =20
=20
Protected.name=3Dname =20
Protected.attr=3D{}
Protected.elements=3D[] =20
text=3DgetStr(attr,"")+getStr(text,"")=20
if(isValStr(text)) Protected.elements[0]=3Dtext=20
for(var i in attr) if(isStr(attr[i])) Protected.attr[i]=3Dattr[i]=20
Protected.tagend=3Dtagend =20
Final=3D{
y:4,
x:5
}
Private.Final=3D{ crap:"sdf" }
}=20
HTMLElement.Public=3D{
getHTML:function(){=20
var str=3D"<"+Protected.name+" "+ Protected.getAttributes()+ ">" + =
Protected.getElements()
str+=3D(Protected.tagend)?"</"+Protected.name+">":""
return str=20
},=20
addAttribute:function(attr){ Final;
for(var i in attr) if(typeof attr[i]=3D=3D"string") =
Protected.attr[i]=3Dattr[i] =20
return this
}
}
HTMLElement.Protected=3D{
getElements:function(){
var str=3D""=20
for(var i in Protected.elements){ =20
var elm=3DProtected.elements[i]
str+=3DisStr(elm)?elm:elm.getHTML() =20
} =20
return str
}
}
HTMLElement.Static=3D{
// blabla
}
HTMLElement.Private=3D{
// blabla
}
HTMLElement.Extends(SuperClass)
function BODY(attr){
Super("BODY",attr,"",true)
}
BODY.Extends(HTMLElement)
......nice..eh?
But I'll put my money where my mouth is in a month or so...
Probably will post it on SourceForge... if noone can tell me a better =
place ?=20
-----Ursprungligt meddelande-----
Fr=E5n: Eytan Heidingsfeld <ey...@tr...>
Till: dyn...@li... =
<dyn...@li...>
Datum: den 7 februari 2001 15:20
=C4mne: RE: [Dynapi-Dev] SuperClass
>Do you mind sending over the unfinished code. As you may have heard I'm
>working myself on my OOJS. I'd love to see what you have done.
>
>8an
>
>
>_______________________________________________
>Dynapi-Dev mailing list
>Dyn...@li...
>http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
|
|
From: Michael P. <mp...@ph...> - 2001-02-07 12:12:28
|
I'm just looking for anything that will allow me to extend an object with= out hard coding it into the constructor. If you need any assistance with error checking / bug locating, I'd be mor= e than willing to give you a hand. Bart Bizon wrote: > Which SuperClass are you talking about? > Brandon Myers SuperClass? > I myself am developing a revamp of that SuperClass, which will enable c= lass-based OOP (with a lot of basic OO concepts supported, such as encaps= ulation, types and what have you). > I am not quite finished with it though, still want to get error handlin= g in, but when I'm done I will release it opensource. > It will truly be an amazing tool for building real class libraries in J= avascript, much in the vein of Java. > > -----Ursprungligt meddelande----- > Fr=E5n: Michael Pemberton <mp...@ph...> > Till: dyn...@li... <dyn...@li...= t> > Datum: den 6 februari 2001 15:35 > =C4mne: [Dynapi-Dev] SuperClass > > >Does anyone have a copy of the code for this? example? documentation? > >-- > >Michael Pemberton > >mp...@ph... > >ICQ: 12107010 > > > > > > > >_______________________________________________ > >Dynapi-Dev mailing list > >Dyn...@li... > >http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev -- Michael Pemberton mp...@ph... ICQ: 12107010 |
|
From: Eytan H. <ey...@tr...> - 2001-02-07 14:21:48
|
Do you mind sending over the unfinished code. As you may have heard I'm working myself on my OOJS. I'd love to see what you have done. 8an |