This is infact interesting.. I am interested to see how it goes :))
I have created(still working on it) a SuperClass object which enables =
"true" OO inheritance for any function... (I used Brandon Myers =
SuperClass as a starting point.)
It includes:
- Platform/browser compatability (currently works on IE4+, Netscape =
4.05+, Opera 5 ; PC and Macintosh)=20
- Abstract Classes (currently working on private and protected methods =
and variables)
- proper inheritance, i.e. prototype and Object method reference =
inheritance, with Java like syntax, i.e. theClass.Extends(theSuperClass)
- inheriting specific functions from any Object
- Multiple Inheritance
- a Class Tree and access to the entire ClassTree from any instance or =
Class
- ability to call Super(), up the entire Class tree, in both methods and =
and constructors, no argument evaling=20
- correct construction of Classes, with a call to SuperClass and =
instance id's set implicitly.=20
- subClassOf(), instanceOf(), real destroy() =20
- possibility to add inherited Object methods
- Instance tracking
- possibility to clone instances
And probably more to come :)
-----Ursprungligt meddelande-----
Fr=E5n: Eytan Heidingsfeld <ey...@tr...>
Till: Dynapi-Dev <dyn...@li...>
Datum: den 9 januari 2001 20:56
=C4mne: [Dynapi-Dev] New OOJS
>Like I have mentioned many times before I don't like how DynAPI is =
used. It
>is an API not a language, but I'm getting ahead of myself. Let's start =
at
>the beginning. In the beginning there is JS. Problem number one is that =
JS
>is class oriented and not object oriented therefore the "weird" =
inheriting.
>That problem was later solved by my Inherit method. Problem Number two =
is
>that although it is a program language that is class oriented it =
doesn't
>give you the necesary building blocks to use it correctly. Because of =
this
>reason I decided to write the OOJS (Object Oriented Java Script). =
Before I
>explain my ideas for how when and where (which you are free and are
>encouraged to criticize) I will warn you that unlike JS which is a =
scrambled
>mix of Java, C and some other languages this OOJS is Delphi like in =
syntax.
>The reason for this is that when I started I was doing this for a =
certain
>project which I would be working on with Delphi programmers. Now for =
the
>OOJS.
>
>First of all you have the most base object TObject. All objects inherit =
from
>it! It includes a small amount of properties and methods including a =
create
>and a destroy (and there events). Then you have TComponent. TComponent =
is
>the base class used for visual objects. How does it work. It uses the =
DynAPI
>as I think it is supposed to be used, as an API. That means that I have =
a
>DynLayer as a private variable. Then I have methods as such =
DrawComponent,
>Draw and events such as onPaint or onRefresh. Then if you want to =
create
>your visual component all you have to do is inherit from TComponent and =
call
>the correct methods. As you may have noticed the event structure is
>different too. It is like in Delphi (big surprise) you define a type =
which
>is basically a definition of a procedure then you implement it and set =
a
>property of your object with this procedure and when the object wants =
to
>invoke it calls its property for the event.
>
>This is just the beginning and I know it is very jumbled. By tomorrow I =
will
>send out the basic code I have till now and anyone who is interested in
>helping please email me.
>
>Work needed to be done:
>A. Finish fixing up base types
>B. Rewrite DynDocument to a new type called TApplication (no biggie =
since
>DynDocument is 80 lines)
>C. Start converting objects from the library to the new OOJS model =
(easy
>enough once model is done)
>
>Any Takers,
>
>Thanx,
>8an
>
>
>_______________________________________________
>Dynapi-Dev mailing list
>Dyn...@li...
>http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
>
|