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... 

function HTMLElement(name,attr,text,tagend){
 if(!isValStr(name)) return alert("HTMLElement syntax error! No element name.")   
   
   Protected.name=name   
   Protected.attr={}
   Protected.elements=[]  
   text=getStr(attr,"")+getStr(text,"") 
   if(isValStr(text)) Protected.elements[0]=text 
   for(var i in attr) if(isStr(attr[i])) Protected.attr[i]=attr[i] 
   Protected.tagend=tagend   
   Final={
      y:4,
      x:5
   }
     Private.Final={ crap:"sdf" }
} 

HTMLElement.Public={
 getHTML:function(){ 
  var str="<"+Protected.name+" "+ Protected.getAttributes()+ ">" + 
Protected.getElements()
      str+=(Protected.tagend)?"</"+Protected.name+">":""
  return str 
 }, 
 addAttribute:function(attr){   Final;
  for(var i in attr) if(typeof attr[i]=="string") Protected.attr[i]=attr[i]  
  return this
 }
}
HTMLElement.Protected={
 getElements:function(){
  var str="" 
  for(var i in Protected.elements){   
   var elm=Protected.elements[i]
   str+=isStr(elm)?elm:elm.getHTML()    
  }  
  return str
 }
 }

HTMLElement.Static={
    // blabla
}
HTMLElement.Private={
  // 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 ? 

-----Ursprungligt meddelande-----
Från: Eytan Heidingsfeld <[EMAIL PROTECTED]>
Till: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: den 7 februari 2001 15:20
Ämne: 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
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>


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

Reply via email to