473,397 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

prototype.js bindAsEventListener without 'this'

I would like to set up an event observer outside of an object, so I
can't use this.bindAsEventListener. How can I pass the correct object
reference?

I tried something like this, and various other variations, but no luck.
This works when I set it up from inside the object, using "this.",

Event.observe(targetId,'click',targetId.select.bin dAsEventListener(this),false);

Jun 5 '06 #1
28 2591
Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEventListener. How can I pass the correct object
reference?


What are you referring to? Do not assume the subject line can be, or
even is, read.

Try asking the author of that crap known as prototype.js about the code.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 5 '06 #2

Yeah, maybe his crappy reply will be more helpful than your null
content one.

Randy Webb wrote:
Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEventListener. How can I pass the correct object
reference?


What are you referring to? Do not assume the subject line can be, or
even is, read.

Try asking the author of that crap known as prototype.js about the code.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Jun 5 '06 #3
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one.


See? You learned something new today.

You use code written by an idiot and then you want someone in this group
to wade through all that code written by an idiot to tell you how to
extend that code written by an idiot and then don't like it when they
tell you to ask the author of that code written by an idiot?

P.S. Did I mention that prototype.js is code written by an idiot?

This is Usenet, not your help desk.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 5 '06 #4
Randy Webb <Hi************@aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered). I assume that is the goal of your posting
it. If it isn't, have you considered simply not answering questions
about prototype.js? I bet it would be better for your blood pressure
as well :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jun 5 '06 #5
Randy Webb wrote:
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one.

See? You learned something new today.

You use code written by an idiot and then you want someone in this group
to wade through all that code written by an idiot to tell you how to
extend that code written by an idiot and then don't like it when they
tell you to ask the author of that code written by an idiot?

P.S. Did I mention that prototype.js is code written by an idiot?

Come on Randy, don't beat about the bush, if you've got something to
say, say it!

--
Ian Collins.
Jun 5 '06 #6
> > Diodeus said the following on 6/5/2006 4:45 PM:
I would like to set up an event observer outside of an object, so I
can't use this.bindAsEventListener. How can I pass the correct object
reference?


Diodeus,

You fell into a trap. A particularly rude one unfortunately.

You will have better luck with Prototype.js questions on the rails
spinoffs list

http://lists.rubyonrails.org/mailman...rails-spinoffs

Search the archives here to find out why people don't like
prototype.js.

http://www.javascripttoolbox.com/bes....php#prototype

An better alternative is the Yahoo! UI

http://developer.yahoo.com/yui/

Peter

Jun 6 '06 #7
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************@aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered).


In the future, I will endeavor to call them people lacking professional
skill rather than use the word that describes them. Fair enough?

<URL: http://en.wikipedia.org/wiki/Idiot>
person lacking professional skill

Anybody that would write something that is as advanced and complex as
prototype is and not comment it, support it, or in any way (that I have
seen to date), try to explain how to use it, what better - more
diplomatic - word is there to describe it?

Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really means.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 6 '06 #8
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************@aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?


Your opinion, which you are entitled to, could be presented more
diplomatically (which would also increase the chance of it being
received and considered).


In the future, I will endeavor to call them people lacking professional
skill rather than use the word that describes them. Fair enough?

<URL: http://en.wikipedia.org/wiki/Idiot>
person lacking professional skill

Anybody that would write something that is as advanced and complex as
prototype is and not comment it, support it, or in any way (that I have
seen to date), try to explain how to use it, what better - more
diplomatic - word is there to describe it?


I doubt the author of Prototype.js forced his code on anyone. He
probably uses it himself and it was nice of him to say to the world
something like "here is my experiment with JavaScript, if you want to
figure it out and use it, go for it." That is a generous contribution
even if the code is not to your liking. Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language. I think you are being a little harsh on the
author.

If someone decides to use Prototype.js in their project and has no
problems then maybe it is good for them. It could bite them later but
maybe it won't. Some projects just won't use the parts of Prototype.js
that might cause problems.

Peter

Jun 6 '06 #9
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************@aol.com> writes:
P.S. Did I mention that prototype.js is code written by an idiot?

[snip]
Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really means.


According to my Concise Oxford Dictionary the word "idiot" currently has
two meaning: person so deficient in mind as to be permanently incapable
of rational conduct; and, utter fool. In modern English usage it does
not mean "a person lacking in professional skills" (which it may have
2,400 years ago in a different culture.)

Andrew Poulos
Jun 6 '06 #10
pe**********@gmail.com wrote:
<snip>
... . Likely it is good to look at JavaScript through
Ruby eyes just for a different perspective on the
JavaScript language. ... <snip>

Historically it has proved a bad idea to look at javascript as anything
but javascript. People assuming that they could think of javascript as a
form of Java has already lead to much misconception, including books
filled with statements made about javascript that would be true of Java
but are false when made about javascript. Finding the answer to the
question in javascript terms would probably prove most interesting and
informative to someone trying to use javascript.

However, once again the question cannot even be answered in javascript
terms, because it lacks the code and context. As asked the question is
equivalent of someone asking "I call - myFunction(x, y, z); -; why
doesn't it work?" and leaving it at that. It is not a strategy for
getting answers.
If someone decides to use Prototype.js in their project
and has no problems then maybe it is good for them.
It could bite them later but maybe it won't.
When people use off-the-shelf code as an opportunity to avoid learning
javascript then that does tend to turn round and bite them. The problem
is simply that having created one superficially successful project the
odds are that they will be asked to create another, and a more ambitions
one. Eventually there will be a case where the off-the-shelf code cannot
deliver, an alternative cannot be found, and there is no choice but
start to write javascript from scratch. It is potentially embarrassing
for someone who has been given a job because of their 'experience'
suddenly to find themselves writing amateurish browser scripts because
they put off the effort of learning javascript properly until it was too
late.

A telling factor is asking yourself why nobody who knows javascript, to
the extent of being in a position to accurately explain any non-trivial
aspects of javascript, is using prototype.js at all. It does appear that
what you learn, when you make the time to learn javascript, includes the
reasons for not using this (type of) code.
Some projects just won't use the parts of Prototype.js
that might cause problems.


You have just stated one of the arguments against using monolithic
client-side libraries at all: downloading code that will never be used.

Richard.
Jun 6 '06 #11

Randy Webb wrote:
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one.


See? You learned something new today.


Yup, I learned that you are a condescending jerk. It must be difficult
living with such keyboard rage. I would hate to see you behind the
wheel of a car.

Jun 6 '06 #12
pe**********@gmail.com wrote:
Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language.
That's like saying maybe it's good to look at Chinese through Swahili
eyes just for a different perspective on the Chinese language.

JavaScript != Ruby
JavaScript != C++
JavaScript != Perl
<etc>
If someone decides to use Prototype.js in their project and has no
problems then maybe it is good for them.
Maybe.
It could bite them later but
maybe it won't.
Maybe.
Some projects just won't use the parts of Prototype.js
that might cause problems.


Maybe.

But when they DO have problems, it's kinda pointless to ask about them
in a javascript group, since prototype.js re-makes javascript into
something that it isn't.

Jun 6 '06 #13
Andrew Poulos wrote:

According to my Concise Oxford Dictionary the word "idiot" currently has
two meaning: person so deficient in mind as to be permanently incapable
of rational conduct; and, utter fool.


Somehow, I think Richard would still consider it the proper word :)
Jun 6 '06 #14
Andrew Poulos said the following on 6/5/2006 11:35 PM:
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************@aol.com> writes:

P.S. Did I mention that prototype.js is code written by an idiot?

[snip]
Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really means.


According to my Concise Oxford Dictionary the word "idiot" currently has
two meaning: person so deficient in mind as to be permanently incapable
of rational conduct; and, utter fool.


Good thing I posted the definition I used then eh? The second good thing
is that I don't use the Oxford Dictionary.
In modern English usage it does not mean "a person lacking in professional
skills" (which it may have 2,400 years ago in a different culture.)


Did you fail to read the wiki article?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 9 '06 #15
Tony said the following on 6/6/2006 12:43 PM:
Andrew Poulos wrote:

According to my Concise Oxford Dictionary the word "idiot" currently
has two meaning: person so deficient in mind as to be permanently
incapable of rational conduct; and, utter fool.


Somehow, I think Richard would still consider it the proper word :)


Randy might also :)

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 9 '06 #16
Diodeus said the following on 6/6/2006 9:36 AM:
Randy Webb wrote:
Diodeus said the following on 6/5/2006 7:07 PM:
Yeah, maybe his crappy reply will be more helpful than your null
content one. See? You learned something new today.


Yup, I learned that you are a condescending jerk.


That's one of the nicer things said about me here, so thank you for the
compliment.
It must be difficult living with such keyboard rage.
"keyboard rage"? Yeah right. I suppose you think that my "rage" is
caused by something in Usenet? You couldn't be further from the truth my
boy.
I would hate to see you behind the wheel of a car.


Nothing scary about my driving, its idiots in Usenet that scare *me*.
Besides, what is there to worry about? 140mph and between the ditches -
no problems.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 9 '06 #17

Tony wrote:
pe**********@gmail.com wrote:
Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language.


That's like saying maybe it's good to look at Chinese through Swahili
eyes just for a different perspective on the Chinese language.


A linguist might say this is a good idea. It could expose
anthropological connections between the two cultures.

Investigating and experimenting with the flexibility of JavaScript is
not a bad idea. It might prove interesting and that is it. Sometimes
good and unexpected results come from investigations. But new things
usually do not come until you start looking from a new angle.

Peter

Jun 9 '06 #18
pe**********@gmail.com wrote:
Tony wrote:
pe**********@gmail.com wrote:
Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language.
That's like saying maybe it's good to look at Chinese through Swahili
eyes just for a different perspective on the Chinese language.


A linguist might say this is a good idea. It could expose
anthropological connections between the two cultures.


Probably not the best example, as in the case of prototype.js, it would
be like trying to make Chinese SOUND like swahili.
Investigating and experimenting with the flexibility of JavaScript is
not a bad idea. It might prove interesting and that is it. Sometimes
good and unexpected results come from investigations. But new things
usually do not come until you start looking from a new angle.


Depends on the angle. prototype.js tries fo force javascript into a box
it was never meant to fit into - and from what I've learned recently, it
actually limits the flexibility of javascript. It would be far better to
learn what javascript CAN do.

--
"The most convoluted explanation that fits all the available and made-up
facts is the most likely to be believed by conspiracy theorists"
Jun 9 '06 #19

Tony wrote:
pe**********@gmail.com wrote:
Tony wrote:
pe**********@gmail.com wrote:
Likely it is good to look at
JavaScript through Ruby eyes just for a different perspective on the
JavaScript language.

That's like saying maybe it's good to look at Chinese through Swahili
eyes just for a different perspective on the Chinese language.


A linguist might say this is a good idea. It could expose
anthropological connections between the two cultures.


Probably not the best example, as in the case of prototype.js, it would
be like trying to make Chinese SOUND like swahili.


Tony, I think there is a misunderstanding here. I said _look_ at
JavaScript throught Ruby eyes. That means try the Prototype.js
experiment and see what is discovered. I didn't say _use_. I'm not
suggesting using Prototype.js. Just that the experiment might spark
some interesting ideas. Those interesting ideas may only end up being
things like "don't do this or that in JavaScript."

My point was that the Prototype.js author made an experiment and others
chose to use it. I have never seen him agressively promoting the
library and I doubt he forced it on anyone. But he gets called an idiot
for generously sharing his experiment. Doesn't seem right.

Investigating and experimenting with the flexibility of JavaScript is
not a bad idea. It might prove interesting and that is it. Sometimes
good and unexpected results come from investigations. But new things
usually do not come until you start looking from a new angle.


Depends on the angle. prototype.js tries fo force javascript into a box
it was never meant to fit into - and from what I've learned recently, it
actually limits the flexibility of javascript. It would be far better to
learn what javascript CAN do.


So those are the experimental results. That's good.

Peter

Jun 9 '06 #20
pe**********@gmail.com wrote:
My point was that the Prototype.js author made an experiment and
others chose to use it. I have never seen him agressively promoting
the library and I doubt he forced it on anyone. But he gets called an
idiot for generously sharing his experiment. Doesn't seem right.


It's not right. But I don't think most people call him an idiot. On the
contrary, I think prototype.js is an inspired bit of coding. A little bit
off in its aim and technique in some places, but it packs a lot of very
practical code into a library which could be the only library that some
people would need to use.

I think that recommendations like those in the best practices document to
not use prototype.js should be fair and impartial, point out the reasons why
using the lib is not recommended, and leave the final judgement up to the
reader.

The only criticism I would point at prototype's _author_ is the lack of
documentation and support, instead leaving its users to go to others to
support his code.

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jun 9 '06 #21
Randy Webb wrote:
Andrew Poulos said the following on 6/5/2006 11:35 PM:
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
Randy Webb <Hi************@aol.com> writes:

> P.S. Did I mention that prototype.js is code written by an idiot?


[snip]
Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really
means.

According to my Concise Oxford Dictionary the word "idiot" currently
has two meaning: person so deficient in mind as to be permanently
incapable of rational conduct; and, utter fool.


Good thing I posted the definition I used then eh? The second good thing
is that I don't use the Oxford Dictionary.


In modern Greek usage "idiotes" usually means an individual, a private
person, or to be like one. So the definition you referred to was one of
the possible connotations as probably used in an ancient Greek city state?

In my opinion, a real dictionary is a good thing. Or perhaps you'd
prefer an online version:
<url: http://www.answers.com/main/ntquery?s=idiot&gwp=13 >
<url: http://www.answers.com/main/ntquery?s=idiot&gwp=13 >
In modern English usage it does not mean "a person lacking in
professional skills" (which it may have 2,400 years ago in a different
culture.)


Did you fail to read the wiki article?


In the wiki article under the heading "Use as an abuse" it clearly tells
states that: in modern English "idiot" is a derogatory term used to
insult, usually meaning "you are stupid".

Andrew Poulos
Jun 9 '06 #22
Andrew Poulos said the following on 6/8/2006 10:44 PM:
Randy Webb wrote:
Andrew Poulos said the following on 6/5/2006 11:35 PM:
Randy Webb wrote:
Lasse Reichstein Nielsen said the following on 6/5/2006 7:25 PM:
> Randy Webb <Hi************@aol.com> writes:
>
>> P.S. Did I mention that prototype.js is code written by an idiot?

[snip]

Many people in this group - and elsewhere - get annoyed when certain
words are used simply because they don't know what the word really
means.

According to my Concise Oxford Dictionary the word "idiot" currently
has two meaning: person so deficient in mind as to be permanently
incapable of rational conduct; and, utter fool.
Good thing I posted the definition I used then eh? The second good
thing is that I don't use the Oxford Dictionary.


In modern Greek usage "idiotes" usually means an individual, a private
person, or to be like one. So the definition you referred to was one of
the possible connotations as probably used in an ancient Greek city state?


I am not Greek either. The definition I posted was the one I used.
In my opinion, a real dictionary is a good thing.
I never said differently either :)
Or perhaps you'd prefer an online version:
<url: http://www.answers.com/main/ntquery?s=idiot&gwp=13 >
<url: http://www.answers.com/main/ntquery?s=idiot&gwp=13 >


Idiot: A foolish or stupid person

Stupid: Tending to make poor decisions or careless mistakes

<URL: http://www.answers.com/stupid?ff=1>

And it only goes to reinforce what I said. Anybody that will code
something as advanced and large as prototype.js is without documenting
it is making a very poor (careless) decision.

Again, people are taking the word as an insult (derogatory) with regards
to the code itself when that isn't what I said. It wasn't idiotic code,
it was code written by an idiot.
In modern English usage it does not mean "a person lacking in
professional skills" (which it may have 2,400 years ago in a
different culture.)


Did you fail to read the wiki article?


In the wiki article under the heading "Use as an abuse" it clearly tells
states that: in modern English "idiot" is a derogatory term used to
insult, usually meaning "you are stupid".


And wiki goes on to explain, in the entry for stupidity, that it is
"The term can thus also refer to poor use of judgement"

Which is precisely my point.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 9 '06 #23
Matt Kruse said the following on 6/8/2006 10:05 PM:
pe**********@gmail.com wrote:
My point was that the Prototype.js author made an experiment and
others chose to use it. I have never seen him agressively promoting
the library and I doubt he forced it on anyone. But he gets called an
idiot for generously sharing his experiment. Doesn't seem right.
It's not right. But I don't think most people call him an idiot.


Most probably don't.
On the contrary, I think prototype.js is an inspired bit of coding.
A little bit off in its aim and technique in some places, but it packs
a lot of very practical code into a library which could be the only
library that some people would need to use.
And with it a ton of code they would never use? And no, I won't have the
library or not argument/discussion again.
I think that recommendations like those in the best practices document to
not use prototype.js should be fair and impartial, point out the reasons why
using the lib is not recommended, and leave the final judgement up to the
reader.
As long as one of the reasons not to use it is lack of documentation and
support :)
The only criticism I would point at prototype's _author_ is the lack of
documentation and support, instead leaving its users to go to others to
support his code.


That is precisely why I used the term idiot. Not with regards to the
code itself, its aim, or it's implementation. But the lack of
documentation and support.

And for what it's worth, if I wrote prototype.js or anything close to it
*without documentation* and/or support, I would even call myself an idiot.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jun 9 '06 #24

Randy Webb wrote:
Matt Kruse said the following on 6/8/2006 10:05 PM:

The only criticism I would point at prototype's _author_ is the lack of
documentation and support, instead leaving its users to go to others to
support his code.


That is precisely why I used the term idiot. Not with regards to the
code itself, its aim, or it's implementation. But the lack of
documentation and support.

And for what it's worth, if I wrote prototype.js or anything close to it
*without documentation* and/or support, I would even call myself an idiot.


I think that if people want to use something that is given away for
free then they should be grateful for what they are given. The author
is not required to give documentation or support. Yes documentation is
nice but I don't think giving something away for free without
documentation or support makes an author an idiot. No matter how you
look at it he is giving away hours and hours of work for free. That is
generous, not idiotic. If a user requires documentation then the
project clearly hasn't reached a mature enough stage for them yet.

Jun 9 '06 #25
Randy Webb wrote:
In the wiki article under the heading "Use as an abuse" it clearly
tells states that: in modern English "idiot" is a derogatory term used
to insult, usually meaning "you are stupid".
And wiki goes on to explain, in the entry for stupidity, that it is
"The term can thus also refer to poor use of judgement"


, or insensitivity to nuances in a person who is otherwise intelligent.
Which is precisely my point.


Which is what, that you can find an obsolete meaning of a common English
word and then use a definition from its modern English usage to pretend
you weren't being rude? Fine, I'll go on believing that 'idiot' is
offensive even if you believe it is otherwise.

Andrew Poulos
Jun 9 '06 #26
pe**********@gmail.com wrote:
Tony wrote:
pe**********@gmail.com wrote:
Tony wrote:
pe**********@gmail.com wrote:
>Likely it is good to look at
>JavaScript through Ruby eyes just for a different perspective
> on the JavaScript language.

That's like saying maybe it's good to look at Chinese through
Swahili eyes just for a different perspective on the Chinese
language.

A linguist might say this is a good idea. It could expose
anthropological connections between the two cultures.
Probably not the best example, as in the case of prototype.js,
it would be like trying to make Chinese SOUND like swahili.


Tony, I think there is a misunderstanding here. I said
_look_ at JavaScript throught Ruby eyes.


To date nothing at all has been said about javascript from a Rudy
perspective. Looking, of itself, is not a useful action, some sort of
statements, observations or conclusions would be necessary before the
worth of the activity could be assessed, and for something new to be
said before it looked worthwile.
That means try the Prototype.js
experiment and see what is discovered.
Don't you think it has been tried? The results seem to be all the issues
that would be expected of a monolithic library, plus additional
obscurity following from trying to hide behind a superficial facade of a
different language. Prototype.js is not innovation, it is a reiteration
of old mistakes in a new guise.
I didn't say _use_. I'm not
suggesting using Prototype.js.
But that is exactly what you frequently are saying, by proposing people
look elsewhere for help rather than encouraging them to present their
issues here in a form that would allow their questions to be answered.

The latter would be much better in the long run, as it would allow
people to gain a better understanding of javascript and so produce
superior results. It also may allow the debate to go beyond the general
flaws in the library and get down to the specifics of the code it
contains.

You won't see it, but I suspect that many of the recent Prototype.js
questions were amenable to simple, direct and efficient solutions
derived from the nature of javascript, but instead the OPs have been
sent off to chaise layering complexity upon complexity, sometimes by you
personally.
Just that the experiment might spark some interesting
ideas.
Repeating an old experiment is unlikely to produce new ideas. Such
repetition is somewhat inevitable when people operate in isolation, or
in isolated groups, as the people who have tried these things before
don't then get a chance to point out the issues.

Don't think that this group is not familiar with new ideas. A number of
(seemingly) new ideas have emerged on this group, and been developed
here. Ideas that have radically altered the way in which people have
been writing javascript over the last three or four years, including
much that is employed in Prototype.js. However, the reality is that the
people who have contributed most in that direction have been those most
interested in javascript as a language, as understanding how the
language works is the real rout to seeing its potential.
Those interesting ideas may only end up being
things like "don't do this or that in JavaScript."
Exactly
My point was that the Prototype.js author made an
experiment and others chose to use it.
But how often has that been an informed decision? These days it is
looking like people are using Prototype.js jsut because others are using
it.
I have never seen him agressively promoting the library
and I doubt he forced it on anyone. But he gets called an
idiot for generously sharing his experiment. Doesn't seem right.


If he regards Prototype.js as an experiment (so not production quality
code, suited to truly general application, implementing a strategy
already validated/tested through experimentation, demonstration and
testing) then he should be actively discouraging people form using it,
at least pending the outcome of the experiment.

<snip>
... . prototype.js tries fo force javascript into a
box it was never meant to fit into - and from what I've
learned recently, it actually limits the flexibility of
javascript. It would be far better to learn what javascript
CAN do.


So those are the experimental results. That's good.


If an experiment results in a recognised failure what is the reason for
repeating the experiment, ad infinitum?

Richard.
Jun 9 '06 #27
pe**********@gmail.com wrote:
Tony wrote:
pe**********@gmail.com wrote:
Tony wrote:

pe**********@gmail.com wrote:

>Likely it is good to look at
>JavaScript through Ruby eyes just for a different perspective on the
>JavaScript language.

That's like saying maybe it's good to look at Chinese through Swahili
eyes just for a different perspective on the Chinese language.

A linguist might say this is a good idea. It could expose
anthropological connections between the two cultures.
Probably not the best example, as in the case of prototype.js, it would
be like trying to make Chinese SOUND like swahili.

Tony, I think there is a misunderstanding here. I said _look_ at
JavaScript throught Ruby eyes. That means try the Prototype.js
experiment and see what is discovered. I didn't say _use_. I'm not
suggesting using Prototype.js. Just that the experiment might spark
some interesting ideas. Those interesting ideas may only end up being
things like "don't do this or that in JavaScript."


OK
My point was that the Prototype.js author made an experiment and others
chose to use it. I have never seen him agressively promoting the
library and I doubt he forced it on anyone. But he gets called an idiot
for generously sharing his experiment. Doesn't seem right.


I think that one of the problems is that it's poorly coded to begin with.

As to the rest - I can't speak for others, but if I were to release
ANYTHING publicly, I would want to be sure it was (a) good, and (b) had
at least some basic documentation. Call it a matter of professional pride.
Investigating and experimenting with the flexibility of JavaScript is
not a bad idea. It might prove interesting and that is it. Sometimes
good and unexpected results come from investigations. But new things
usually do not come until you start looking from a new angle.


Depends on the angle. prototype.js tries fo force javascript into a box
it was never meant to fit into - and from what I've learned recently, it
actually limits the flexibility of javascript. It would be far better to
learn what javascript CAN do.


So those are the experimental results. That's good.


I think in this case, the "experiment" likely does more harm than good,
because far too many don't see it as an experiment, but adopt it as a
regular method of programming javascript.

--
"The most convoluted explanation that fits all the available and made-up
facts is the most likely to be believed by conspiracy theorists"
Jun 9 '06 #28
In article <11*********************@y43g2000cwc.googlegroups. com>,
pe**********@gmail.com writes

<snip>
I think that if people want to use something that is given away for
free then they should be grateful for what they are given.

<snip>

That includes advice not to use something, advice that is given away for
free. People should be grateful for this advice. Right ?

John
--
John Harris
Jun 9 '06 #29

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Web Developer | last post by:
Hi, Comming from Java, it seems that prototype declarations are like abstract methods. I have not read classes in C++ yet, but prototype declarations are a strange concept. Any comments...
2
by: stephane | last post by:
Hi all, What I am trying to achieve is an 'inherits' method similar to Douglas Crockford's (http://www.crockford.com/javascript/inheritance.html) but that can enable access to the superclass'...
14
by: Mantorok Redgormor | last post by:
Would this by any chance invoke undefined behavior? extern int printf(const char *, ...); int main(void) { printf("Hello\n"); return 0; } That is, providing my own printf prototype would...
21
by: Rob Somers | last post by:
Hey people, I read a good thread on here regarding the reason why we use function prototypes, and it answered most of my questions, but I wanted to double check on a couple of things, as I am...
12
by: petermichaux | last post by:
Hi, I've been reading the recent posts and older archives of comp.lang.javascript and am surprised by the sentiments expressed about the prototype.js library for a few reasons: 1) The library...
45
by: bigdadro | last post by:
I've created a new class using prototype.js. After I make the ajax.request all references to this.myClassMethodorVariable are lost. Does the ajax method blow out the object persistance? I'm fairly...
4
by: reggiestyles | last post by:
Hi, I've got a question about prototype and event handling. I've got several div's (dynamic number) on a page that I want to set as active or inactive (basically, I'm using scriptaculous'...
4
by: danf | last post by:
Can anyone tell me what the difference is between these two protoype methods? They are extensions of Javascript's Function class. Is bindAsEventListener just used to be compatible with IE's...
1
by: tdan | last post by:
I do not know how to get Event.stopObserving() to work in the context I am using it. I am displaying a Color Selection Table and attaching 2 events: 1. onmouseover to display the color to the user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.