At 09:12 29/03/2001, you wrote:
>Message: 4
>Date: Thu, 29 Mar 2001 01:27:12 -0500
>From: Robert Rainwater <[EMAIL PROTECTED]>
>
>Maybe functions like removeFromArray and splice can be attached to the
>Array prototype, then it would really js extensions. Also we could have
>something like registerFile, that is called at the top of every dynapi file is
>included. Then requireFile(), can be used to make sure that all of
>the right packages/files are included.
>
>I'm not sure if we should/could do this with the next release. Then,
>it would not really be DynAPI 2, but really DynAPI 2 and 3/4. That
>would mean a lot of restructuring. No problem for me, but for others
>it may be. Plus all of the documentation would need to be changed as
>well. If enough people want to get involved and help out that would
>be fine, but if not then it would be difficult to update all of the
>info.
>
>Perhaps, now would be a good time to move on to DynAPI 3. Maybe
>DynAPI 3 will be the first release that truly supports the dom and
>Mozilla 1.0 (NS 6).
>
>I'll save my judgement until I see it :)
>
>--
>Robert Rainwater
I do not often post something into the mailing list, but this topic makes
me react.
Globally, I like Pascal's approach, not because I'm Dutch too, but because
it seems that I encounter the same problems many of us encounter. On my
site, I use a huge amount of javascript, as for bandwidth reasons, I
generate most of the HTML code by using javascript. I have a whole file of
things "that should have been there" in vanilla javascript, but
unfortunatly are not there (isArray(a), Array.prototype.toString(),
Array.prototype.contains(element), Array.prototype.push(element) and pop()
(in IE5 and 4), deleteAndPack(array, indice) (equivalent to
removeFromArray), String.prototype.trim(), Array.prototypepseudoSplice,
etc......). Using a kind of jsextd file is what I'm really doing right now,
so I tend to think it should be a MUST HAVE.
A second point is the requireFile problem: I HATE writing (unnecessary)
comments in my dynapi widgets saying:
/*
This widget requires:
DynAPI (api.*; util.thread; util.pathanim);
DynAPI_extensions.js;
CollapseElement.js
*/
I'd prefer to write something useful like:
require(Dynapi.api.*);
require(Dynapi.util.thread);
require(Dynapi.util.pathanim);
the require() function would then check in a global variable if the
corresponding .js file is already "loaded" and if not, do the corresponding
document.write() stuff. I have not tested this kind of solution, and donot
know if it could work this way (chicken and egg problem)... Is this what
you meant Pascal ?
And btw, OF COURSE the requireFile() function proposed by Pascal should be
generic enough to load other javascript files, not only DynAPI stuff.
About the attribute renaming (_x), I's love to see it, because:
1°) it doesn't really harm (i.e. does not remove any functionnality if
anything is renamed)
2°) Permits to make someone think "Hey, strange they named this attribute
this way, a _ in front of it, maybe I should look a bit further into the
documentation, maybe I should look at the comment, maybe I'm doing
something wrong by using it ?" I know I would, and I also know that just a
comment saying "// private " is not enough (but please add comments
everywhere else :-)
So, for the first time of my life, I fully agree to
Pascal.....................on this subject
Stone war !!!
Japie, aka Marc
PS: Could someone write a "anti-memory-leak guide", as I have HUGE problems
with it ?
PPS: completely off-topic. It seems many people here have Flash
experience. Is it possible to pass parameters to flash file by using
<params> tags inside the <embed> tag ?
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev