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
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev