[Prototype-core] Re: Notices in unamended prototype.js version 1.5.0_rc1

2007-01-20 Thread Richard Quadling
Would a patch to remove the notices be acceptable to the developers?
As a developer of commercial software for nearly 20 years and only
recently coming to web development, I am  still learning about what
different rules apply. One of the things I've always thought is that
if my code produces any sort of warnings now, there is always the
chance that in years to come those warnings could become errors. If
the compiler/interpreter is producing a warning, then I should code it
to remove the possibility of ambiguity. Whilst the code works fine,
removing these notices can only be a good thing.

I don't want to turn off the notices as my own code sometimes has them
and I go "Doh! Duh!" and fit it. It would remove the noise and help
other developers who may not be as efficiently experienced and who do
make the sort of mistakes that these notices are highlighting.

Richard.

On 19/01/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> Sorry, read the ill-formed sentence above as "Prototype framework is coded
> in perfectly valid JavaScript..."
>
> -M
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Notices in unamended prototype.js version 1.5.0_rc1

2007-01-22 Thread Richard Quadling
Aha! Thank you very much for the pointers on this. I apologise for
creating the noise. I would suggest adding something to the main
website about this as I am sure you get a lot of queries from
non-beginner, but non-advanced, developers (people like me).

An excellent product and extremely useful for me.

Thank you again.

Richard Quadling.

On 20/01/07, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
>
> Ahm, no.
>
> As there is no compiler involved, these "warnings" are generated by
> the JavaScript interpreter, and are purely meant for catching typos
> and other things. They are more annoying than helpful if you know
> what you're doing.
>
> Mind you, these warnings are purely out of the imagination of the
> developers of one particular browser, and if you get rid of these
> warnings, suddenly other warnings could pop up in the next browser
> version...
>
> Here's an article about it:
> http://www.howtocreate.co.uk/strictJSFirefox.html
>
> We have perfectly valid JavaScript, so no need for a patch. Also, if
> something breaks in JavaScript in 5 years it will take half the
> internet down with it, so no need to have headaches over that... :)
>
> Best,
> Thomas
>
> Am 20.01.2007 um 09:56 schrieb Richard Quadling:
>
> > Would a patch to remove the notices be acceptable to the developers?
> > As a developer of commercial software for nearly 20 years and only
> > recently coming to web development, I am  still learning about what
> > different rules apply. One of the things I've always thought is that
> > if my code produces any sort of warnings now, there is always the
> > chance that in years to come those warnings could become errors. If
> > the compiler/interpreter is producing a warning, then I should code it
> > to remove the possibility of ambiguity. Whilst the code works fine,
> > removing these notices can only be a good thing.
> >
> > I don't want to turn off the notices as my own code sometimes has them
> > and I go "Doh! Duh!" and fit it. It would remove the noise and help
> > other developers who may not be as efficiently experienced and who do
> > make the sort of mistakes that these notices are highlighting.
> >
> > Richard.
> >
> > On 19/01/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> >> Sorry, read the ill-formed sentence above as "Prototype framework
> >> is coded
> >> in perfectly valid JavaScript..."
> >>
> >> -M
> >>
> >>
> >>>
> >>
> >
> >
> > --
> > -
> > Richard Quadling
> > Zend Certified Engineer : http://zend.com/zce.php?
> > c=ZEND002498&r=213474731
> > "Standing on the shoulders of some very clever giants!"
> >
> > >
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Unimportant question about parameters from an newbie.

2007-01-22 Thread Richard Quadling
Having read through the warnings (and subsequently turned off the
strict mode), I have a final question on 1 of the warnings.

Function.prototype.bindAsEventListener = function(object) {

This method requires a parameter which is subsequently overwritten by
argument retrieval code, in exactly the same way as the preceding
method Function.prototype.bind, but this declaration does not have the
parameter defined.

As neither method has specific tests to make sure a parameter was
supplied, is it necessary for the bindAsEventListener to have the
parameter.

Again, I'm no expert, but I like consistency. Alternatively, would not
overwriting the object be just as efficient? Just args.shift() with no
assignment?

Put this at the bottom of the pile - it is not an urgent.

Regards,

Richard Quadling.

On 20/01/07, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
>
> Ahm, no.
>
> As there is no compiler involved, these "warnings" are generated by
> the JavaScript interpreter, and are purely meant for catching typos
> and other things. They are more annoying than helpful if you know
> what you're doing.
>
> Mind you, these warnings are purely out of the imagination of the
> developers of one particular browser, and if you get rid of these
> warnings, suddenly other warnings could pop up in the next browser
> version...
>
> Here's an article about it:
> http://www.howtocreate.co.uk/strictJSFirefox.html
>
> We have perfectly valid JavaScript, so no need for a patch. Also, if
> something breaks in JavaScript in 5 years it will take half the
> internet down with it, so no need to have headaches over that... :)
>
> Best,
> Thomas
>
> Am 20.01.2007 um 09:56 schrieb Richard Quadling:
>
> > Would a patch to remove the notices be acceptable to the developers?
> > As a developer of commercial software for nearly 20 years and only
> > recently coming to web development, I am  still learning about what
> > different rules apply. One of the things I've always thought is that
> > if my code produces any sort of warnings now, there is always the
> > chance that in years to come those warnings could become errors. If
> > the compiler/interpreter is producing a warning, then I should code it
> > to remove the possibility of ambiguity. Whilst the code works fine,
> > removing these notices can only be a good thing.
> >
> > I don't want to turn off the notices as my own code sometimes has them
> > and I go "Doh! Duh!" and fit it. It would remove the noise and help
> > other developers who may not be as efficiently experienced and who do
> > make the sort of mistakes that these notices are highlighting.
> >
> > Richard.
> >
> > On 19/01/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> >> Sorry, read the ill-formed sentence above as "Prototype framework
> >> is coded
> >> in perfectly valid JavaScript..."
> >>
> >> -M
> >>
> >>
> >>>
> >>
> >
> >
> > --
> > -
> > Richard Quadling
> > Zend Certified Engineer : http://zend.com/zce.php?
> > c=ZEND002498&r=213474731
> > "Standing on the shoulders of some very clever giants!"
> >
> > >
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: What is the reason for this?

2007-02-14 Thread Richard Quadling
I would recommend announcing the removal BEFORE the actual removal.
Give a clear indication of what is required to upgrade old but working
code to new and working code. Remember that the the user's code is NOT
wrong and that the change being made is a nicety and NOT a bug.
Introducing BC breaks are always going to cause headaches for users
("It worked last week and when I upgraded the library it didn't work
any more - can you help me fix it?" - sort of thing).



On 14/02/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 2/14/07, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > For stuff like this, we'd need some way of marking things as deprecated,
> giving a warning that it "will be removed in next major version".
>
> I don't think it's necessary to go the Rails way with this. Simply writing
> the blog post about deprecated stuff for versions 1.6 - 2.0 and repeating
> those notices when actually releasing seems enough.
>
> $("foo").toggle is nicer (and more encouraged!), anyway. How hard will it be
> to replace? And if people really want to update fast without fixing their
> old code at the moment, we could provide a backwards-compatibility addon
> with this code we removed.
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: What is the reason for this?

2007-02-14 Thread Richard Quadling
Almost - but there are many, [dramatic pause] many fools out there.

On 14/02/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 2/14/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> > I would recommend announcing the removal BEFORE the actual removal.
>
> Yeah, that's why I said "warn people in advance via blog posts" (only in
> different words).
>
> People read the blog. Also, there could be deprecation notices in release
> notes for minor releases, as well as API break warnings in changelog for
> major releases. Coupled with the compatibility add-on this plan is (almost)
> foolproof! :)
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: What is the reason for this?

2007-02-14 Thread Richard Quadling
On 14/02/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 2/14/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> > Almost - but there are many, [dramatic pause] many fools out there.
>
> So we're talking about a person that keeps up to latest Prototype framework,
> but doesn't read the blog, isn't interested in the changelog, ignores the
> deprecation notices and is unaware of the compatibility addon? Where does he
> live and why is he updating then?
>
> In short, my heart bleeds for that guy :P

Oh. Um. Er. There's a compatibility addon?
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: What is the reason for this?

2007-02-19 Thread Richard Quadling
If you really want to force the issue with regard to upgrading code
with a new library, you could easily supply the library in a disabled
manner. Add a simple alert saying that the library is currently
disabled and the readme details how to enable it along with any recent
changes.

But you are right, those that just update the library and not there
own code (or simply ship an upgrading library to the clients - EEK!),
are asking for trouble!



On 18/02/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I agree that Toggle should be removed, i have been spending alot of
> time optimising the prototype library for my own projects, such as
> removing bad and inefficient uses of functions and removing Toggle was
> one of the first things i did.
>
> One thing i would like to mention is that prototype is not supplied in
> a package with a readme file or the like, what percentage of people
> are likely to read installation instructions when downloading a new
> version. In there it could include important information such as
> depreciantion notices.
>
> But i still have no sympathy for people who fail to upgrade their code
> along with the libraries that they upgrade.
>
> On Feb 14, 1:57 pm, "Mislav Marohnić" <[EMAIL PROTECTED]>
> wrote:
> > On 2/14/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Oh. Um. Er. There's a compatibility addon?
> >
> > Just an idea I tossed in previously. Removed code could simply be extracted
> > to such an add-on.
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: new Event functionality

2007-02-22 Thread Richard Quadling
I like "The Magic Numbers", but only on CD, not in my code. So +1 to
replace them with constants.

On 21/02/07, Tom Gregory <[EMAIL PROTECTED]> wrote:
>
> On Feb 21, 2007, at 2:56 PM, Mislav Marohnić wrote:
>
> > Also, what about that Safari text-node event target thing? Should
> > we have a fix for that also?
> >
>
> Isn't that as easy as updating Event.element(), or am I missing
> something?
>
> i.e.
>element: function(event) {
> +var e = event.target || event.srcElement;
> +return (e.nodeType == 3) ? e.parentNode : e;
> -return event.target || event.srcElement;
>},
>
>
>
> On a similar but slightly unrelated note, could/should Prototype
> handle IE's lack of implementation for the Node constants?  This
> would allow Prototype to not use "magic numbers" when checking node
> types, but a human-readable constant string?
>
> http://www.w3.org/TR/DOM-Level-2-Core/ecma-script-binding.html
>
> if (typeof Node == "undefined") {
> var Node = new Object();
> Object.extend (Node, {
> ELEMENT_NODE: 1,
> ATTRIBUTE_NODE: 2,
> TEXT_NODE: 3,
> CDATA_SECTION_NODE: 4,
> ENTITY_REFERENCE_NODE: 5,
> ENTITY_NODE: 6,
> PROCESSING_INSTRUCTION_NODE: 7,
> COMMENT_NODE: 8,
> DOCUMENT_NODE: 9,
> DOCUMENT_TYPE_NODE: 10,
> DOCUMENT_FRAGMENT_NODE: 11,
>     NOTATION_NODE: 12
> });
> }
>
>
> Thus,
>
> $('someEl').nodeType == 3
>
> becomes
>
> $('someEl').nodeType == Node.TEXT_NODE
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Documentation.

2007-02-22 Thread Richard Quadling

Hi.

I would like to build a Windows CHM version of the prototype API
documentation. Once built (and hopefully fully automated using PHP and
MS Windows HTMLHelp Compiler), I would be releasing the CHM for free
use. Whilst the PDF is great, I prefer a CHM file to be able to add it
to my list of manuals (PHP, PEAR, PECL, Smarty, HTML, CSS, JS, SQL and
hopefully prototypeJS).

With that in mind I have a few questions.

1 - If I need permission to produce a derivative of the documentation,
who do I apply to for this?
2 - In terms of design/layout, I would like to use the current
prototypejs.org website as I am useless at design, so do I need
permission for this?


Regards,

Richard Quadling.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Translating documentation?

2007-02-22 Thread Richard Quadling
I do some work on the PHP documentation.

To allow for multiple languages, the documentation is primarily
written in English and stored in a CVS repository. The translators
watch for CVS commits and then update their versions of the manual,
committing those changes back to CVS. There is a separate build
process to take the CVS and construct webpages and CHM in all the
languages.

The format at the moment is Docbook and a combination of DSSSL and XSL
along with a bit of PHP are used to do all of this.

Unfortunately, I'm no Docbook/DSSSL/XSL expert.

Having a repository for the documentation would be useful.

The biggest issue is for non-english speaking users getting out of
date documentation as there translators (all volunteers) have not
translated the most recent amendments.

Having said that, for such a small API, there shouldn't be too much of
an issue keeping on to of the edits.

Richard.

On 22/02/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> We briefly mentioned translations in one of our discussions. If they
> existed, they would have to be hosted and maintained elsewhere. How many
> volunteers would there be and will the multilingual docs be up-to-date with
> the official ones, we don't know.
>
> I guess the idea doesn't have enough interest yet.
>
>
>
> On 2/22/07, Jussi Salminen <[EMAIL PROTECTED] > wrote:
> > Hi,
> >
> > I wonder is there any needs to translate official Prototype manual to
> another language than english?
> > English is the "internet" language, but still there are many peoples that
> doesn't understand some meanings of manual.
> >
> > If need, I could translate manual in english to finnish.
> >
> > I think that at least next languages should have own manual
> > * Spain
> > * German
> >
> > Just idea, not yet anything more..
> >
> >
> >
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Running in circles!

2007-02-22 Thread Richard Quadling

Having completely lost the plot I need a little help.

I want to create my own class (called class_FaxPageNumber). I want it
to work like a prototype Object (i.e. have inspect() and stuff).

I've got my initialize() method (along with the 5 other methods this
class uses).

My code starts ...

var class_FaxPageNumber = Class.create();
class_FaxPageNumber.prototype = {
initialize: function()
{
...
},
/* More methods here. */
}

But this doesn't give me a .inspect() method and there is no
Object.create() method.

Running in circles.

NOTE: I only want to define the class to inherit the Object methods.

I have different code which will actually use this class - the class
is going to be part of a library  with other scripts using it as they
need.

Regards,

Richard Quadling.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Running in circles!

2007-02-22 Thread Richard Quadling
I want to create a class which has the same properties as Object, with
some of my own whistles.

Not instantiate the object, just declare it.

The instantiation comes later in other code.

So, I suppose, how do I inherit Object into my class?



On 22/02/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
> Hey Richard,
>
> Richard Quadling a �crit :
> > But this doesn't give me a .inspect() method and there is no
> > Object.create() method.
>
> Of course.  Why would it?  If you look at Prototype's source, you'll see
> that any object having an inspect method implements it (Array, String,
> Hash, and the like).  This is because nobody can guess for you what
> inspect() should do for your specific class.
>
> There is also no such thing as Object.create.  Anywhere.  Except for
> Class.create.  Creating a new object is done using the "new" operator,
> as in:
>
> var fpn = new class_FaxPageNumber();
>
> > NOTE: I only want to define the class to inherit the Object methods.
>
> Prototype classes don't inherit a thing.  They only provide a initialize
> convention for the constructor, and Object.extend spares you having to
> manually deal with the native JS syntax, which is slightly more outlandish.
>
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Running in circles!

2007-02-23 Thread Richard Quadling

Certainly. Sorry for the noise.

On 23/02/07, Tobie Langel <[EMAIL PROTECTED]> wrote:
>
> Richard,
>
> Could you please kindly post this into - 
> http://groups-beta.google.com/group/rubyonrails-spinoffs
> ?
>
> The Prototype Core list is for discussion of patches, releases, and
> other issues related to the development of Prototype. It is not for
> support questions - please use the users mailing list for this.
>
> Thanks!
>
> Tobie
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Which is "better"?

2007-03-02 Thread Richard Quadling

Hi.

I've got some very old code I am upgrading to use prototype.js ( Thank
you all of you ).

I have used 2 ways of adding new elements to the document at run time.

One way is to use innerHTML and the other is to use
createElement/appendChild/etc.

Which is "better" and why? Is there an alternative way?

Thanks,

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] AJAX and updating display.

2007-03-08 Thread Richard Quadling

Hi.

I've just been learning how to get client side page updated with
server side progress and to allow the process to be stopped by the
client.

Client runs a periodic updater to ask the server what progress is
being made on its task.

Client starts a server process which takes a LONG time.
Server side process updates the session storage with its progress.
Server side process watch the session for an abort message and dies if
it see one.

If the user aborts the process (pressing escape for example), the
client starts a server process which sets the abort flag in the
session.

This methodology is working just great for me.

So, I would just like to say THANK YOU for all your hard work. My
pages are so much more interesting now with realtime updates of the
statistics which are being generated on the server by various
processes.

abort.php, process.php and progess.php - 3 simple scripts which all
talk to each other via the session.

I just LOVE it and so do the users here.

THANK YOU

Regards,

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: New 1.5.1 methods added to Windows-Helpfile

2007-03-12 Thread Richard Quadling
Ha! I was working on a completely automated script to produce a CHM
file, just like the ones I use from the PHP dox.

Is there an XML source for the files or are they manually maintained as HTML?

I would STRONGLY recommend storing the dox in an XML format and then
using a conversion process to produce HTML (static or dynamic is
server can support it)/CHM/PDF/ThoutReader (http://www.osoft.com).

Converting the XML to HTML can be done via XSLT easily enough. If the
pages are held in DOCBOOK format this would be common with PHP dox.

If there are any XSL experts out there (I'm not sorry), then
http://cvs.php.net/phpdoc contains all the PHP documentation and build
system (build system for web, html download, chm download - 2 variants
with and without advanced styling/skinning capability), etc. The raw
XML files are in the process of being converted to DOCBOOK and I
believe most are already done.

All the syntax highlighting for PHP is done within the XSLT and is fine.

If anyone IS XSL expert and would like to see how the PHP build
process works, then I can talk you through the installation process
and build process easily enough (requires Cygwin if you are on
Windows, otherwise I believe *ix has all the bits and pieces already
in place, but you would need to check - for Windows, Cygwin contains
everything you would need).

Other than that, Kjell has done a great job. I didn't know there was
one already available.

I am in the process of building a process to construct my own CHM file
(as I want to be able to add it to my own CHM dox -
PHP/HTML/SQL/JS/CSS and now Prototype).

I'm on Windows and use Teleport Pro to grab the entire site which also
makes the entire site localhost only - no web files. From there
stripping out Google/meta/scripts, etc. and then build index and
finally construct CHM project file. Still a WIP, but fully automated.

Regards,

Richard Quadling.

On 10/03/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
> I would agree, but i was unable to find feeds for the subpages eg,
> ajax/options/atom.xml or ajax_options/atom.xml .. all lead to 404. But
> even if you have atoms for all pages (IIRC you do) then things like
> HTML tables would still mess up the layout. I would have to rework the
> whole file after this operation.
>
> Anyways.. It is good as it is right now. The initial creation was hard
> but updating is rather easy now, so switching now from manual to
> auto-creation is not an option for me anymore.
>
> By the way.. i tried the auto-discovered feed and it is the feed from
> the blog. You might want change that to the feed-adress for the
> api-page or place a link to it somewhere.
>
>
> On 3/10/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> > On 3/10/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
> > > Yes, i copied page by page and added custom syntax highlightinh etc..
> > > Doing this automaticly is not a good idea. I tried it the day after
> > > the docs were put online but it was a mess. Too much different markup,
> > > crosslinks, etc..
> >
> > I don't agree that it would be a mess. Write a script that pulls down the
> > XML files, eg.:
> > http://prototypejs.org/feed/api/ajax/atom.xml
> >
> > Then the same script should split the entries into HTML files and rewrite
> > the crosslinking. But, suit yourself.
> >
> >
> >  >
> >
>
>
> --
> Regards, Kjell
> www.m3nt0r.de
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Number.toPaddedString question.

2007-03-12 Thread Richard Quadling
Hi.

Great to see some new functionality in prototype.

I have a question about the position of the new toPaddedString method
for the Number class.

Shouldn't you have the pad method as part of the String class?

I would like to contribute some new String methods

String.Chr, String.Asc, String.prototype.addCommas,
String.prototype.left/mid/right, String.prototype.lTrim/trim/rTrim,
String.prototype.makePlural, String.prototype.pad

I've attached my code. It may be of use to you. As own pad method
names are different, I'm not in any trouble with a name conflict.

Regards,

Richard Quadling.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



enhanced_string.js
Description: JavaScript source


[Prototype-core] AJAX.Request onLoaded

2007-03-12 Thread Richard Quadling

The dox says that this is not guaranteed. When/where is it not
guaranteed? It would be useful to know about browser
incompatibilities/issues in these circumstances - especially if it was
documented!!!

Regards,

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Number.toPaddedString question.

2007-03-12 Thread Richard Quadling

'10'.makePlural('lad', 'y', 'ies') == 1 ladies

should have been

'10'.makePlural('lad', 'y', 'ies') == 10 ladies


On 12/03/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> strip only removes leading and trailing spaces.
>
> I DO see though, that the regex version is a little nicer to read and
> I'll be see if it is faster than the string manip version I have.
>
> trim/ltrim/rtrim allow for arbitrary characters to be removed,
> removing quotes or dot, etc.
>
> makePlural and addCommas are both currently English (i.e. s is for
> Plural, cat/cats).
>
> You can use alternative plurals...
>
> '10'.makePlural('box', '', 'es') == 10 boxes
> '1'.makePlural('lad', 'y', 'ies') == 1 lady
> '10'.makePlural('lad', 'y', 'ies') == 1 ladies
>
> So, you can supply your own appropriate single/plural suffix.
>
> As there is no standard, even in english, I took the normal english version.
>
> I do see that this would be an issue for foreign speakers. The
> cleanest solution would be to always supply the suffixes and to always
> append them to the output, supplied or blank.
>
>
>
> On 12/03/07, Tom Gregory <[EMAIL PROTECTED]> wrote:
> >
> > trim already exists under the name "strip" (taken from Ruby).
> >
> > You may wish to consider the international nature of prototype when
> > proposing functions like makePlural or addCommas.
> >
> >
> > TAG
> >
> > On Mar 12, 2007, at 2:59 AM, Richard Quadling wrote:
> >
> > > Hi.
> > >
> > > Great to see some new functionality in prototype.
> > >
> > > I have a question about the position of the new toPaddedString method
> > > for the Number class.
> > >
> > > Shouldn't you have the pad method as part of the String class?
> > >
> > > I would like to contribute some new String methods
> > >
> > > String.Chr, String.Asc, String.prototype.addCommas,
> > > String.prototype.left/mid/right, String.prototype.lTrim/trim/rTrim,
> > > String.prototype.makePlural, String.prototype.pad
> > >
> > > I've attached my code. It may be of use to you. As own pad method
> > > names are different, I'm not in any trouble with a name conflict.
> > >
> > > Regards,
> > >
> > > Richard Quadling.
> > > --
> > > -
> > > Richard Quadling
> > > Zend Certified Engineer : http://zend.com/zce.php?
> > > c=ZEND002498&r=213474731
> > > "Standing on the shoulders of some very clever giants!"
> > >
> > > >
> > > 
> >
> >
> > > >
> >
>
>
> --
> -
> Richard Quadling
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Number.toPaddedString question.

2007-03-12 Thread Richard Quadling

strip only removes leading and trailing spaces.

I DO see though, that the regex version is a little nicer to read and
I'll be see if it is faster than the string manip version I have.

trim/ltrim/rtrim allow for arbitrary characters to be removed,
removing quotes or dot, etc.

makePlural and addCommas are both currently English (i.e. s is for
Plural, cat/cats).

You can use alternative plurals...

'10'.makePlural('box', '', 'es') == 10 boxes
'1'.makePlural('lad', 'y', 'ies') == 1 lady
'10'.makePlural('lad', 'y', 'ies') == 1 ladies

So, you can supply your own appropriate single/plural suffix.

As there is no standard, even in english, I took the normal english version.

I do see that this would be an issue for foreign speakers. The
cleanest solution would be to always supply the suffixes and to always
append them to the output, supplied or blank.



On 12/03/07, Tom Gregory <[EMAIL PROTECTED]> wrote:
>
> trim already exists under the name "strip" (taken from Ruby).
>
> You may wish to consider the international nature of prototype when
> proposing functions like makePlural or addCommas.
>
>
> TAG
>
> On Mar 12, 2007, at 2:59 AM, Richard Quadling wrote:
>
> > Hi.
> >
> > Great to see some new functionality in prototype.
> >
> > I have a question about the position of the new toPaddedString method
> > for the Number class.
> >
> > Shouldn't you have the pad method as part of the String class?
> >
> > I would like to contribute some new String methods
> >
> > String.Chr, String.Asc, String.prototype.addCommas,
> > String.prototype.left/mid/right, String.prototype.lTrim/trim/rTrim,
> > String.prototype.makePlural, String.prototype.pad
> >
> > I've attached my code. It may be of use to you. As own pad method
> > names are different, I'm not in any trouble with a name conflict.
> >
> > Regards,
> >
> > Richard Quadling.
> > --
> > -
> > Richard Quadling
> > Zend Certified Engineer : http://zend.com/zce.php?
> > c=ZEND002498&r=213474731
> > "Standing on the shoulders of some very clever giants!"
> >
> > >
> > 
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Number.toPaddedString question.

2007-03-12 Thread Richard Quadling

/*
Add commas to a number with the ability to define :
s_Decimal = The decimal separator in the output string - Default is English '.'
s_Thousand = The separator for every 3 digits - Default is English ','
s_SplitDecimalUsing = If you are formatting an English input to
non-English output, you can use a different decimal separator for your
input and your output - Default is English '.'
*/
addCommas : function(s_Decimal, s_Thousand, s_SplitDecimalUsing)
{
s_Decimal = (arguments.length < 1) ? '.' : s_Decimal;
s_Thousand = (arguments.length < 2) ? ',' : s_Thousand;
s_SplitDecimalUsing = (arguments.length < 3) ? '.' : 
s_SplitDecimalUsing;

var a_Parts = this.lTrim('0').split(s_SplitDecimalUsing);
a_Parts[2] = a_Parts.length > 1 ? s_Decimal + a_Parts[1] : '';
a_Parts[0] = (0 == a_Parts[0].length) ? '0' : a_Parts[0];

var obj_RegEx = /(\d+)(\d{3})/;

while (obj_RegEx.test(a_Parts[0]))
{
a_Parts[0] = a_Parts[0].replace(obj_RegEx, '$1' + s_Thousand + 
'$2');
}

return a_Parts[0] + a_Parts[2];
},

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Number.toPaddedString question.

2007-03-12 Thread Richard Quadling
I'm not a rails person at all. What do you mean by "irregular inflections list"?

On 12/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 3/12/07, Tom Gregory <[EMAIL PROTECTED]> wrote:
> >
> > You may wish to consider the international nature of prototype when
> > proposing functions like makePlural ...
>
> Yeah and makePlural would only be useful when coupled with the irregular
> inflections list such as in Rails. We don't tend to bring the entire app
> logic to the client yet ;)
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Number.toPaddedString question.

2007-03-13 Thread Richard Quadling
Aha!  Very useful. But the list must be MASSIVE!!! and then different
languages use different rules.

With the comments made, I can see no need to add them to prototype,
though maybe the addCommas method could be useful for instances where
nicely formatted numbers is required.

On 13/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 3/12/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> > I'm not a rails person at all. What do you mean by "irregular inflections
> list"?
>
> They maintain a list of irregular stuff, like "octopus" -> "octopi". The
> framework also lets you specify your own irregular plurals or to save
> uncountable words like "media" or "news". Thanks to this mechanism, you can
> write "octopus".pluralize() (without specifying anything at the call time)
> and get "octopi".
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Hash.toQueryString changes

2007-03-14 Thread Richard Quadling
On 13/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> "foo=a&foo=b&foo=c" becomes { foo:['a', 'b', 'c'] }. Rails (PHP too, I
> think) would preserve only the first value. Ruby preserves all.

In PHP, this would end up as

array(1) { ["foo"]=>  string(1) "c" }

$_GET is an array of 1 element with an index of 'foo' with a value of 'c'.

> "foo[]=a&foo[]=b&foo[]=c" becomes { 'foo[]':['a', 'b', 'c'] }. Rails and PHP
> would now preserve all values, but remove the square brackets from the key.

In PHP, this would end up as

array(1) { ["foo"]=>  array(3) { [0]=>  string(1) "a" [1]=>  string(1)
"b" [2]=>  string(1) "c" } }

$_GET is an array of 1 element with an index of 'foo' which is an
array of 3 elements, 'a', 'b' and 'c'.

If you have PHP, use this as showget.php





-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Dox Typo

2007-03-20 Thread Richard Quadling

http://prototypejs.org/api/prototype

2nd paragraph of Default iterators and functions.

2nd sentence.

... (wich ...

should be

... (which ...



Whilst this will be fixed, is there a central repository (CVS/SVN) for
the dox? If so, where? Not needing karma, just read access.

Thanks.


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Dox Typo

2007-03-20 Thread Richard Quadling
On 20/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> > Whilst this will be fixed, is there a central repository (CVS/SVN) for the
> dox? If so, where? Not needing karma, just read access.
>
> No such thing - we used Mephisto, so everything is in its database in form
> of articles. If you want to download alternative formats, use Atom feeds in
> API sections or PDF/CHM bundles.

Ok. Thanks. Screen scrape it is then to automate a CHM build.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Dox Typo

2007-03-20 Thread Richard Quadling
I updated my printed PDF copy too! Amazing what a biro can do nowadays!

On 20/03/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
> Thanks for the heads up. I've updated the CHM version.
>
>
> On 3/20/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> > On 20/03/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> > > > Whilst this will be fixed, is there a central repository (CVS/SVN) for 
> > > > the
> > > dox? If so, where? Not needing karma, just read access.
> > >
> > > No such thing - we used Mephisto, so everything is in its database in form
> > > of articles. If you want to download alternative formats, use Atom feeds 
> > > in
> > > API sections or PDF/CHM bundles.
> >
> > Ok. Thanks. Screen scrape it is then to automate a CHM build.
> >
> > --
> > -
> > Richard Quadling
> > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> > "Standing on the shoulders of some very clever giants!"
> >
> > >
> >
>
>
> --
> Regards, Kjell
> www.m3nt0r.de
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Fwd: [Rails-spinoffs] Re: Observing the Right-click (for good, not evil)

2007-04-25 Thread Richard Quadling

Any comments on this?

-- Forwarded message --
From: Richard Quadling <[EMAIL PROTECTED]>
Date: 24-Apr-2007 11:55
Subject: Re: [Rails-spinoffs] Re: Observing the Right-click (for good, not evil)
To: [EMAIL PROTECTED]


Just reading through the patches for this in Trac
(http://dev.rubyonrails.org/changeset/6537 and
http://dev.rubyonrails.org/ticket/7520).

I've added some notes there to explain my code. I've tested this on
WinXP SP2 with IE7, Opera9 and FF2. All with slightly different
results.



On 24/04/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I didn't realise that the Event.button and Event.which values were
> different 'tween IE and FF.
>
> 
> 
>  src="/global/javascript/prototype/prototype.js">
> 
> function clicking(e)
>   {
>   alert
> (
> 'You clicked with your ' +
> (Event.isLeftClick(e) ? 'Left' : '') +
> (Event.isRightClick(e) ? 'Right' : '') +
> (Event.isMiddleClick(e) ? 'Middle' : '') +
> '. Event.button which was ' + e.button +
> ' and Event.which was ' + e.which
> );
>   }
> function extendEvent()
>   {
>   Object.extend
> (
> Event,
>   {
>   WHICH_LEFT:   (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 1,
>   WHICH_RIGHT:  (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 3,
>   WHICH_MIDDLE: (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 2,
>   MOUSE_LEFT:   (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 0,
>   MOUSE_RIGHT:  (navigator.appVersion.match(/\bMSIE\b/)) ? 2 : 2,
>   MOUSE_MIDDLE: (navigator.appVersion.match(/\bMSIE\b/)) ? 4 : 1,
>
>   isLeftClick: function(event)
> {
> return (((event.which) && (event.which == Event.WHICH_LEFT)) ||
> ((event.button) && (event.button == Event.MOUSE_LEFT)));
> },
>
>   isRightClick: function(event)
> {
> return (((event.which) && (event.which == Event.WHICH_RIGHT)) ||
> ((event.button) && (event.button == Event.MOUSE_RIGHT)));
> },
>
>   isMiddleClick: function(event)
> {
> return (((event.which) && (event.which == Event.WHICH_MIDDLE)) ||
> ((event.button) && (event.button == Event.MOUSE_MIDDLE)));
> }
>   }
> );
>   }
> 
> Testing clicking
> 
> 
> Left, Right or Middle click me!
> 
> Event.observe(document.body, 'mousedown', clicking);
> Event.observe(window, 'load', extendEvent);
> 
> 
> 
>
> This is sort of working in IE and FF. In IE I don't get the context
> menu but I do in FF (IE7 and FF2.0.0.3)
>
> I think that the middle and right button detection should be added to
> Prototype. The current Left button detection is flawed according to my
> tests as Event.button == 0 for Left.
>
> I hope this makes some sense.
>
> Richard.
>
>
>
>
>
> On 23/04/07, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> >
> > And this fails in Safari, with a work-around posted on Trac of "just
> > don't use Event.Observe..." which is icky.
> >
> > Click it is...
> >
> > Walter
> >
> > On Apr 23, 2007, at 11:54 AM, Walter Lee Davis wrote:
> >
> > > Maybe I'll just
> > > try using a double-click instead...
> >
> >
> > > >
> >
>
>
> --
> -
> Richard Quadling
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
>


--
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Unexpected behaviour when using $A(document.getElementsByTagName("script"))

2007-05-03 Thread Richard Quadling

Hi.

You can jump straight the *** QUESTION *** if you want.

*** BACKGROUND ***

I have my own library of extensions, arranged in a manner similar to
Scriptaculous.

By using the same mechanism to load my library files as Scriptaculous,
I can edit single files and test.

But it is not working, and I'm stuck, but I think I've found my
problem. I just need a little pointer on fixing it.

It all seems to relate to ...

$A(document.getElementsByTagName("script"))

I've put together a small test ...

The HTML file loads Prototype.js (V1.5.1), a simple inline test script
and then Scriptaculous.js (V1.7.0).

In my real code, I load Prototype, Scriptaculous and then my library.

It then reports back, via the inline code, any JS paths or INLINE.

Reports are generated when :

1 - During processing of  and therefore my inline code.
2 - After the expected loading of Scriptaculous.
3 - During processing 
4 - By the Window.onload event.

When in the  tag the output doesn't show scriptaculous. This is
probaly OK the first time, but the second time (i.e. 'After
Scriptaculous'), is isn't.
Both Body and OnLoad correctly report all the files, but
Scriptaculous's files have not loaded.

Basically the scriptaculous library never loads is files (just like
mine wouldn't).

*** QUESTION ***

It seems that the call $A(document.getElementsByTagName("script")) is
cached in some way.

Is there a way to flush this cache prior to calling it again?

Regards,

Richard Quadling.

*** MORE BACKGROUND ***

=The HTML file==




function ReportJS(s_When)
{
$A(document.getElementsByTagName("script")).each(
function(s)
{
console.info(s_When, !!s.src ? s.src : 'inline');
});
}
ReportJS('With Reporter');
function ViaOnLoad()
{
ReportJS('OnLoad');
}
Event.observe(window, 'load', ViaOnLoad);


ReportJS('After Scriptaculous');
JS Test

ReportJS('Body');

=

The test is nothing more than a report for FireBug's console.

With Reporter http://local.quickscripts/global/javascript/prototype/prototype.js
With Reporter inline
After Scriptaculous
http://local.quickscripts/global/javascript/prototype/prototype.js
After Scriptaculous inline
Body http://local.quickscripts/global/javascript/prototype/prototype.js
Body inline
Body 
http://local.quickscripts/global/javascript/script.aculo.us/scriptaculous.js
Body inline
Body inline
OnLoad http://local.quickscripts/global/javascript/prototype/prototype.js
OnLoad inline
OnLoad 
http://local.quickscripts/global/javascript/script.aculo.us/scriptaculous.js
OnLoad inline
OnLoad inline

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Unexpected behaviour when using $A(document.getElementsByTagName("script"))

2007-05-04 Thread Richard Quadling

On 03/05/07, jdalton <[EMAIL PROTECTED]> wrote:
>
> Hello Richard,
>
> First, this is not a $A() issue.
>
> When you called ''With Reporter' you wont get scritpaculous because
> your code is
> executing before scriptaculous is even rendered via the dom. (top
> down)
>
> The dom should be there onLoad though. If not try:
>
> Event.observe(window, 'load', function(){
> setTimeout(function(){
>ReportJS('AfterLoad');
> }, 100);
> });
>
> Maybe dynamically added scripts need time to be seen in the dom,
> I used 100 miliseconds, but if that works i am sure any amount would
> like 10.
>
>
> >
>


Hi. Thanks for the comments but I think I've not explained myself well enough.

Follow this through.




<script tag with src to scriptaculous.js which will automatically load
the sub files>
<script tag with src to my library.js which mimics scriptaculous's
load() method for my sub files>
</head>
...

Nothing special in terms of timing is needed for scriptaculous to
work, even though it is dependent upon prototype.
My library is dependent upon scriptaculous and uses the SAME mechanism
to load additional sub files.
My code doesn't fail due to scriptaculous NOT being loaded (if it
couldn't find scriptaculous it would raise an error, just like
scriptaculous would if it couldn't find prototype).
In MY copy of the load() method, the result of
$A(document.getElementsByTagName("script")) does not include
MY script tag, EVEN THOUGH THE REPORTING OF THE SCRIPTS IS
ACTUALLY IN MY SCRIPT

The issue __is__ caching.

Here is my script...


raq.js
var RAQ_Common =
 {
 Version: '1.0.1',

 load: function()
  {
  if
   (
(typeof Scriptaculous=='undefined') ||
(typeof Element == 'undefined') ||
(typeof Element.Methods=='undefined') ||
parseFloat(Scriptaculous.Version.split(".")[0] + "." +
Scriptaculous.Version.split(".")[1]) < 1.7
   )
{
throw("Richard Quadling's library requires the Scriptaculous
library >= 1.7.0");
}

// This is the problem line. The CURRENT script will NOT be found.
// Instead a cached version of the results will be found.
  $A(document.getElementsByTagName("script")).findAll
   (
   function(s)
{
//Proof - the raq.js script will NOT be reported upon.
console.info(s);
return (!!s.src && s.src && s.src.match(/raq\.js(\?.*)?$/))
}
   ).each
(
function(s)
 {
 var path = s.src.replace(/raq\.js(\?.*)?$/,'');
 var includes = s.src.match(/\?.*load=([a-z,]*)/);
 (
 includes
  ? includes[1]
  : 
'additionalJS,enhanced_date,enhanced_element,enhanced_event,enhanced_math,enhanced_string'
 ).split(',').each
  (
  function(include)
   {
   Scriptaculous.require(path+include+'.js')
   }
  );
 }
  },
 }
RAQ_Common.load();


and a new HTML file

===js_write.html
<html>
<head>
<script type="text/javascript"
src="/global/javascript/prototype/prototype.js">


JS Test

Hello


With this code, my console now reads ...


<script src="/global/javascript/script.aculo.us/scriptaculous.js"
type="text/javascript">

But this is being reported from MY code which is loaded via <script
type="text/javascript"
src="/global/javascript/rquadling/raq.js">

If I swap raq.js and scriptaculous around (and remove the dependency),
scriptaculous won't load all of its files as it won't be able to find
its own tag in the $A() results.




In re-reading your comments about the dynamically loaded scripts, I
think I see what I've not explained properly.

I'm not interested in the sub files that scripaculous loads. What I
have is scriptaculous makes the first call to $A to get the SCRIPTs.

When my code which is loaded via the normal mechanism of a SCRIPT tag,
the same call to get the list of loaded scripts doesn't include the
script CURRENTLY executing.

I can understand that the subscript from scriptaculous may not be
present and this I can understand as being related to the DOM needing
updating, but that is NOT the issue.

This is a caching issue.  Ideally I would like to flush the cache
prior to the my call. If I can do that, then I am confident that this
will work as expected.



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Unexpected behaviour when using $A(document.getElementsByTagName("script"))

2007-05-05 Thread Richard Quadling

The findAll() is in Scriptaculous's code.

How do you load your code and when does it execute?

If you run profiler against the scriptaculous loader, you'll see the
majority of the processing takes place in findandstore (I think, I'm
on a mate's pc quickly with no dev tools at hand). This "Sounds" like
caching to me.

On 04/05/07, jdalton <[EMAIL PROTECTED]> wrote:
>
> Sorry for the double post. Google group error.
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Inheritance: your thoughts?

2007-06-26 Thread Richard Quadling

Not in direct reply to anything being said on this thread, but more of
a few suggestions.

In PHP4, the initialising method had the same name as the class ...



In PHP5 the method is now __construct(), thought the PHP4 behaviour
persists through to PHP6.

The double underscore is PHP's way to signify a "magic" method. There
are many - __sleep, __wake, __toString, __call, __get, __set,
__destruct, etc.

The use of initialise / initialize for me is an issue purely from a
spelling perspective - both are acceptable spellings but only 1 would
actually be used. I would suggest 'construct' as the initialise
method. Also, would there be any mechanism for an AUTOMATIC destruct
mechanism? (An open Ajax connection should close when the user moves
off page or something like that - yes I know userland code can deal
with this via any number of mechanisms, but having it available as a
destruct method which is called automatically during the onunload
event would seem like a useful option).


Again, in PHP, to access the parent class you use parent::. There is
also self:: for static classes and $this to concrete instances.

In Delphi, there is 'inherited' which is used to call the overloaded
method of a parent class. But this is at the method level (i.e. using
the line ...

inherited;

in a method will call the same method in the parent class.



There is also the differentiation between parent and owner to be made clear.

Normally, parent refers to the class up the inheritance tree. Owner
refers to another class entirely which is responsible for this class
(e.g. an array object is the owner to any objects within its array
sort of thing). Calling an Owner method is just as useful. Owner may
also be thought of as a guardian.

In all my OOP work, every object instantiated for an application is
owned by something (the DB connection factory is owned by the
application instance, DB connections are owned by the factory, the
rendering engine - html/pdf/csv/etc are owned by a rendering factory
owned by the application). This allows for tidy shutdown at the end of
the app as any object "owning" another has to tell the owned object to
shutdown first. Every object can potentially own any other object.
Which is why I would like the automatic destruct method. You call the
obj_app.desctruct() method once and all objects are closed/freed in
the correct order (FILO), based upon the ownership structure.

For someone who comes to JS from Delphi and PHP in terms of OOP
coding, I am a little unsure on how to do what I want sometimes.
Having a clear way of doing inheritance (no matter what the way as
long as it is rock solid and consistent, no unnecessary short
circuits), then that would be a good thing.


To all of you working on this, thank you. I hope my suggestions are
treated fairly. Personally I would like things the PHP way as that's
what I know best and would save me the trouble of learning 2 ways, but
that's 'cause I'm lazy.

Good luck and thanks,

Richard Quadling.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Inheritance: your thoughts?

2007-06-26 Thread Richard Quadling
On 26/06/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 6/26/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> >
> > The use of initialise / initialize for me is an issue purely from a
> > spelling perspective - both are acceptable spellings but only 1 would
> > actually be used. I would suggest 'construct' as the initialise
> > method.
>
> We're keeping initialize because a) it's a Ruby convention, b) backwards
> compatibility with existing classes.

That's fine. From an outsider, as long as I know WHY, then that's fine.

> > Also, would there be any mechanism for an AUTOMATIC destruct
> > mechanism? (An open Ajax connection should close when the user moves
> > off page or something like that - yes I know userland code can deal
> > with this via any number of mechanisms, but having it available as a
> > destruct method which is called automatically during the onunload
> > event would seem like a useful option).
>
> I doubt that we'll ever have something like that. Users who want this
> behavior will have to explicitly define how and when do their objects get
> destructed. Automatic destruct mechanism would be bloat to the inheritance
> support code.

I see.


Thank you.


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: SV: [Prototype-core] Inheritance: your thoughts?

2007-06-27 Thread Richard Quadling

On 27/06/07, Tobias Haagen Michaelsen <[EMAIL PROTECTED]> wrote:
>
> JavaScript is not a class based language and I think it is a mistake to try 
> to hard to make it act like one. Many have tried this - and failed.
>
> I think we should focus some more on what it is we want to be able to do and 
> not trying to make JavaScript into something it isn't.
>
> One of the reasons I love Prototype is because it utilises the strengths of 
> the language.
> I don't want a lot of new 'magic' ways of doing stuff that is already 
> possible pretty clean ways.
>
>
> Just my 2 cents -- since I felt this discussion was heading in a 'lets make 
> JS more like Java/C++/etc. (or even Ruby)' :)
>
>
> -Tobias

I don't think TPTB are trying to make JS into Java/PHP, etc. Just
trying to make it easier for those that use OOP in the server all day
long have a helping hand in getting similar functionality into their
client side work.



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Syntax question

2007-07-06 Thread Richard Quadling

On 06/07/07, Vincent <[EMAIL PROTECTED]> wrote:
>
> On Jul 5, 4:38 pm, Sam Stephenson <[EMAIL PROTECTED]> wrote:
> > The comma, when used outside of the context of "var", joins multiple
> > expressions together and evaluates to the value of the last
> > expression.
>
> Oh, I see.
> Though I'm not sure if that syntax was intended or not here (since
> curly braces are present anyway in this case), I can see the
> difference, and the example in the linked reference is another handy
> use :
>
> for (var i=0, j=9; i <= 9; i++, j--) ...
>
> I just learned something :-). Thanks for your helpful explanation !
>
> Vincent.

for (var i=0, j=SomeFunctionToCalculateLimitWhichTakesALongTime(); i
<= j; i++) ...

is a common way to use , also.

What you wouldn't want is ...

for (var i=0; i <= SomeFunctionToCalculateLimitWhichTakesALongTime(); i++) ...

as the function would be executed every iteration.

But's that a for() issue really.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Possible bug.

2007-08-21 Thread Richard Quadling

http://pastebin.com/d748a99f8

Specifically, trying to use writeAttribute() fails.

This is using 1.6.0_rc0 (August 15, 2007).

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Possible bug.

2007-08-22 Thread Richard Quadling

On 21/08/07, Tom Gregory <[EMAIL PROTECTED]> wrote:
>
> Confirmed.
>
> I rewrote as unit tests (the alerts didn't show what was actually
> failing):
> http://pastebin.com/m6bc554f9
>
> ==Safari 3.0.3 (OS X):
> failed  testEachWriteAttribute
> 1 assertions, 1 failures, 0 errors
> Failure: assertEnumEqual: expected [true], actual [false]
>
> It's quite odd to me that invoking writeAttribute worked, but each
> writeAttribute did not.
>
> ==Firefox 2.0.0.6 (OS X):
> failed  testInvokeWriteAttribute
> 1 assertions, 1 failures, 0 errors
> Failure: assertEnumEqual: expected [true], actual [false]
>
> failed  testEachWriteAttribute
> 1 assertions, 1 failures, 0 errors
> Failure: assertEnumEqual: expected [true], actual [false]
>
>
> The same is still true as of current HEAD, rev 7353.
>
>
>
> TAG
>
> On Aug 21, 2007, at 9:56 AM, Richard Quadling wrote:
>
> >
> > http://pastebin.com/d748a99f8
> >
> > Specifically, trying to use writeAttribute() fails.
> >
> > This is using 1.6.0_rc0 (August 15, 2007).
> >
> > Richard.

Hi,

I'm not EXACTLY sure what I've done, but my code is now working.

Element.addMethods ( 'FORM', {
setRadioValue : function(element, s_RadioGroup, s_Value) {
// Extend the form.
element = $(element);
// Set the checked value
o_Return = $$('#' + element.id + ' input[type="radio"][name="' +
s_RadioGroup + '"][value="' + s_Value + '"]').invoke('writeAttribute',
'checked', true);
return o_Return;
}
});

I can now set the value of a radio group for the current form based
upon the name of the group.


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
I'm on Windows IE7, using Sambar Server and my server.log file has
requests like this ...

127.0.0.1 - - [21/Aug/2007:16:58:19 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:16:58:19 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:16:59:01 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:16:59:01 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:17:00:16 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:17:00:16 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:17:02:15 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [21/Aug/2007:17:02:15 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 426 0 "http://dev.salesops.rquadling/testradio.html";
"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; "
127.0.0.1 - - [22/Aug/2007:09:22:08 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 435 79
"http://dev.salesops.rquadling/index.php?Action=9.1.1"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR
2.0.50727; "
127.0.0.1 - - [22/Aug/2007:09:22:08 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 435 79
"http://dev.salesops.rquadling/index.php?Action=9.1.1"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR
2.0.50727; "
127.0.0.1 - - [22/Aug/2007:09:22:17 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 435 0
"http://dev.salesops.rquadling/index.php?Action=9.1.1"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR
2.0.50727; "
127.0.0.1 - - [22/Aug/2007:09:22:17 +0100] "GET /://javascript:void(0)
HTTP/1.1" 404 435 0
"http://dev.salesops.rquadling/index.php?Action=9.1.1"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR
2.0.50727; "

They always appear in pairs and only for IE.
On 22/08/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/22/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
> >
> > I think Sam had reason to write this. I reread Dean Edwards's - who
> > else? :) - post about the window.onload and one of the last comment
> > says with https you can remove the protocol.
> >
> http://dean.edwards.name/weblog/2006/06/again/?full#comment56361
>
> Nice research, Wiktor. Thanks
>
> Jason, can you confirm for sure that your setup makes HTTP requests? Can you
> give us more detailed information? Thanks
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
Using FF and/or the patch previously mentioned and no requests are made.

On 22/08/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/22/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
> >
> > I think Sam had reason to write this. I reread Dean Edwards's - who
> > else? :) - post about the window.onload and one of the last comment
> > says with https you can remove the protocol.
> >
> http://dean.edwards.name/weblog/2006/06/again/?full#comment56361
>
> Nice research, Wiktor. Thanks
>
> Jason, can you confirm for sure that your setup makes HTTP requests? Can you
> give us more detailed information? Thanks
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Date prototype functions [BUMP]

2007-08-23 Thread Richard Quadling
I think many users would be grateful of having additional
libraries/plugins like this. Whilst not necessarily part of the core,
having them logged and available from prototype.js (with all the usual
test cases) would be a nice idea.

Libraries/snippets could/would have peer review for conforming to
"best practice" for using prototype.

The alternative is that a lot of this sort of stuff is on a hundred
different servers and no validation on which version of prototype
things work with.

I would say that whoever wrote the library has the responsibility of
keeping it upto date with the current prototype. Tests can should be
run to confirm that the library works and ensures compatibility.


On 22/08/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/22/07, Ken Snyder <[EMAIL PROTECTED]> wrote:
> >
> >
> > What is the feeling on adding functions to Date.prototype? As mentioned
> > in March (see message at bottom), adding Date.prototype.succ() would
> > allow some helpful iterating. I would suggest an optional argument to
> >
> > succ for time period and I also would like to throw out several more
> > possible methods (below).
> >
>
> Ken, these are nice and certainly useful, but I don't think most of the
> people have a need for them. Most of the heavy-duty date/time logic should
> be kept in your application (server-side). But I'll let other core members
> speak for themselves.
>
> You're encouraged to keep maintaining this extensions and releasing them
> open-source so people who do need them can benefit.
>
>
>  >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
On 23/08/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/23/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> > Using FF and/or the patch previously mentioned and no requests are made.
>
> Can you please try
>
> src=//:
>
> ... like in Base2 and see if there are requests. Thanks

Being a numpty, my current code is ...

var src = "javascript:void(0)";
if (location.protocol == "https:") src = "https://"; + src;
document.write("

[Prototype-core] Array inline filtering.

2007-08-23 Thread Richard Quadling

Hi.

I've just created a small function to filter an array. Sort of the
reverse of each+without.

/*
Version 1.0.0 - Thursday, 23 August 2007 10:25 am
*/

Object.extend (
Array.prototype, {
/***/
/* Allow inline filtering of an array. */
/***/
filter: function(f_Filter) {
var a_Return = [];
for (var i = 0, length = this.length; i < length; ++i)
if (f_Filter(this[i]))
a_Return.push(this[i]);
return a_Return;
}
}
);

Usage :

a_Array.filter(function(item){return true/false;}).chain().chain();

With that 2 questions.

1 - Have I made any REALLY obvious mistakes.
2 - How do I submit this to the core?

Richard


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
On 23/08/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 8/23/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> >
> > This needs to become what? I don't know what Base2 is (sorry).
>
> document.write("

[Prototype-core] Re: Array inline filtering.

2007-08-23 Thread Richard Quadling

On 23/08/07, Ben Newman <[EMAIL PROTECTED]> wrote:
> See Enumerable#select:
>
> > [1, 'a', 2, {}].select(function(n) { return typeof n == 'number' })
> [1, 2]
>
> The name "select" is from Ruby, like most odd things in Prototype :)
>
> On Aug 23, 2:32 am, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
> > Hi.
> >
> > I've just created a small function to filter an array. Sort of the
> > reverse of each+without.
> >
> > /*
> > Version 1.0.0 - Thursday, 23 August 2007 10:25 am
> > */
> >
> > Object.extend (
> > Array.prototype, {
> > /***/
> > /* Allow inline filtering of an array. */
> > /***/
> > filter: function(f_Filter) {
> > var a_Return = [];
> > for (var i = 0, length = this.length; i < length; 
> > ++i)
> > if (f_Filter(this[i]))
> > a_Return.push(this[i]);
> > return a_Return;
> > }
> > }
> > );
> >
> > Usage :
> >
> > a_Array.filter(function(item){return true/false;}).chain().chain();
> >
> > With that 2 questions.
> >
> > 1 - Have I made any REALLY obvious mistakes.
> > 2 - How do I submit this to the core?
> >
> > Richard

Which is actually an alias for findAll(). Doh! Thank you.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
On 23/08/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
>
> On Aug 23, 11:35 am, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
> > > document.write("

[Prototype-core] Re: Bug?

2007-08-23 Thread Richard Quadling
On 23/08/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
>
> On Aug 23, 2:03 pm, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
> > That's now generating requests.
>
> I think I was not clear enough. The correct and working syntax is //:
> which Mislav mentioned. In my first letter I made a typo, but Mislav
> wrote the correct syntax for you. He is right, document.write("

[Prototype-core] Re: Array inline filtering.

2007-08-23 Thread Richard Quadling

Ah. My CHM is upto 1.5 which is why I didn't see it.



On 23/08/07, Jeff Watkins <[EMAIL PROTECTED]> wrote:
>
> Richard, this seems similar to the standard js 1.6
> Array.prototype.filter method. You might be well advised to look at
> the Mozilla MDC site for example code that does this.
>
> On Aug 23, 2007, at 2:32 AM, Richard Quadling
> <[EMAIL PROTECTED]> wrote:
>
> >
> > Hi.
> >
> > I've just created a small function to filter an array. Sort of the
> > reverse of each+without.
> >
> > /*
> > Version 1.0.0 - Thursday, 23 August 2007 10:25 am
> > */
> >
> > Object.extend (
> >Array.prototype, {
> >/***/
> >/* Allow inline filtering of an array. */
> >/***/
> >filter: function(f_Filter) {
> >var a_Return = [];
> >for (var i = 0, length = this.length; i < length; ++i)
> >if (f_Filter(this[i]))
> >a_Return.push(this[i]);
> >return a_Return;
> >}
> >}
> > );
> >
> > Usage :
> >
> > a_Array.filter(function(item){return true/false;}).chain().chain();
> >
> > With that 2 questions.
> >
> > 1 - Have I made any REALLY obvious mistakes.
> > 2 - How do I submit this to the core?
> >
> > Richard
> >
> >
> > --
> > -
> > Richard Quadling
> > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> > "Standing on the shoulders of some very clever giants!"
> >
> > >
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Superclass constructor

2007-09-21 Thread Richard Quadling
On 20/09/2007, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 9/20/07, Les Szklanny <[EMAIL PROTECTED]> wrote:
> >
> > But, shouldn't have to do this or use $super(name).  The superclass
> constructor should be called automatically (as in Dojo for example).
>
> We have modeled OOP support in Prototype based on the most traditional
> inheritance model. Most of the users don't expect overridden constructors to
> be called automatically. If you want to call the superclass constructor, you
> must use $super (please don't do Foo.prototype.bar.apply anymore) - that
> also works with any other method in your classes.
>
> So, thanks for the suggestion, but we're keeping constructors this way.

If you've gone to the trouble of overriding a base/super class's
method (constructor or member function or method or whatever), then it
is your responsibility to call the overridden method if it is
required. Nothing can guess that.

Delphi uses inherited;
PHP uses parent::()
Prototype uses $super()

Different words, same meaning (more or less).

Excellent work all.

Richard

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Some observations and suggestions regarding AJAX

2007-09-26 Thread Richard Quadling

Hi.

I've been diving into the Ajax code in the core.

Some observations.

1 - Registered Ajax.Responders for onSuccess/onFailure are not called
(http://dev.rubyonrails.org/ticket/9643).

2 - Registered Ajax.Responders for onXYZ are not called.

I've got a way to deal with this, but I'm not sure if there is a "better" way.

Basically, the Ajax.Responders.dispatch() method needs to return
true/false if there was a dispatch.

==code==
  dispatch: function(callback, request, transport, json) {
var b_Return = false;
this.each(function(responder) {
  if (Object.isFunction(responder[callback])) {
try {
  responder[callback].apply(responder, [request, transport, json]);
  b_Return = true;
} catch (e) { }
  }
});
  return b_Return;
  }
==code==

So, now in Ajax.Request.prototype.respondToReadyState() method
includes this mod (extends the patch I've supplied) ...

==code==
if(!Ajax.Responders.dispatch('on' + response.status, this, response,
response.headerJSON)) {
  Ajax.Responders.dispatch('on' + (this.success() ? 'Success' :
'Failure'), this, response, response.headerJSON);
}
==code==

This matches the behaviour of the non responder callbacks (the ones
supplied to the request in the options collection).

3 - Exceptions.

It seems that the parameters to the onException callback only includes
the Ajax.Request object. If you are trying to examine the data
returned (say a JSON object supplied in a header as X-JSON, which is
visible in the Ajax.Response), you can't.

Every response has a reference to the request, but not the other way around.

==code==
Ajax.Response.prototype = {
  initialize: function(request){
this.request = request;
==code==

Is there any complication in adding ...

==code==
this.request.response = this;
==code==

This attaches the response to the request which is then passed to the
exception handler and now you can get to the json in the header. Phew!



I hope this is understandable.

Regards,

Richard Quadling.



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] No documentation on Event.fire().

2007-09-27 Thread Richard Quadling

Hi.

Looking at V1.6.0_RC0 and see the Event.fire() method.

But I can't find any documentation on it.

I call it ...

element.fire('change');

This returns an event, as seen via firebug's
console.info(element.fire('change')); but none of the observers are
called.

Any clues please?

Regards,

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: No documentation on Event.fire().

2007-09-27 Thread Richard Quadling
On 27/09/2007, Nicolás Sanguinetti <[EMAIL PROTECTED]> wrote:
>
> It's not in the documentation 'cause 1.6 is still a release candidate.
> When it goes final the docs will include everything in 1.6 :)
>
> On 9/27/07, Wiktor Ihárosi <[EMAIL PROTECTED]> wrote:
> >
> > On Sep 27, 12:09 pm, "Richard Quadling" <[EMAIL PROTECTED]>
> > wrote:
> > > This returns an event, as seen via firebug's
> > > console.info(element.fire('change')); but none of the observers are
> > > called.
> > > Any clues please?
> >
> > my dirty workaround is for firefox:
> >
> > // FIXME
> > // should be selectItem.fire("change"); in prototype
> > var ev = document.createEvent("HTMLEvents");
> > ev.initEvent("change", true, true);
> > selectItem.dispatchEvent(ev);
> >
> > wiktor

Thanks for that. I just read the RC notice and saw that fire only
applies to known observers.

So, this is not what I want.

Thanks anyway.

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Source code style

2007-10-05 Thread Richard Quadling
Are there any good JS prettifiers online? Maybe a link through for
those needing a little visual help would benefit?

On 05/10/2007, Thomas Fuchs <[EMAIL PROTECTED]> wrote:
>
> Hi Sven!
>
> We won't change the way the source code is formatted, as we like it
> the way it is. Most people take a short while to "switch over" from
> more traditional JavaScript source code formatting, but once you've
> made that step the code is pretty easy to read.
>
> The basic rules governing the style are conciseness and overal code
> beauty (of course, beauty lies in the eye of the beholder, so YMMV).
>
> Best,
> Thomas
>
> Am 04.10.2007 um 13:07 schrieb Sven Klose:
>
> >
> > I�m new to the source code, and had big trouble reading it. With the
> > right indentation one could spot constructs immediately, but actually,
> > the code is so compressed, it takes ages to even figure out where a
> > function starts and where it ends, to spot if-statements and variable
> > declarations, and so on.
> >
> > Some suggestions in detail:
> >
> > - dedicate a whole line for an opening/ending brace of a function if
> > it doesn't contain just one statement,
> > - keep the width of lines small,
> > - declare only a single variable in a var-statement,
> > - have indented conditional blocks, instead of squeezing an if-
> > statement into a single line,
> > - use distinct variable names, not 'Method' and 'method' in the same
> > function for example,
> > - use TABs, so all this all can be done without increasing the code
> > size, and one can set the indentation width to suit his/her needs,
> > - add more comments :)
> >
> > Your visual perception can spot the overall structure of code at once.
> > Please keep it stupid for the likes of me. ;) I'd do the reformatting,
> > if desired.
> > However, I find the use of spaces and empty lines very good already.
> >
> > Best regards.
> >
> >
> > >
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: isLeftClick Bug in Proto 1.6.0 RC1

2007-10-18 Thread Richard Quadling

On 17/10/2007, Bart Lewis <[EMAIL PROTECTED]> wrote:
>
> Today I updated to Prototype 1.6.0 RC1 from RC0. I am also using
> Scriptaculous 1.8 preview.
>
> Beyond changing my "contentloaded" to "dom:loaded" the transition
> seemed to go fairly smoothly. Until I encountered the following error
> in IE (6 and 7):
>
> Drags created with "new Draggable(...)" no longer drag.
>
> I traced this back to prototype's "isLeftClick" always returning
> false.
>
> Looks like isLeftClick was significantly changed just yesterday:
> http://dev.rubyonrails.org/changeset/7926
>
> -B

Yes it was. Here is the new code you need for the
is[Left|Middle|Right]Click to work.

Around line 3700-ish.

Event.Methods = (function() {
  var isButton;

  if (Prototype.Browser.IE) {
var buttonMap = { 0: 1, 1: 4, 2: 2 };
isButton = function(event, code) {
  return event.button == buttonMap[code];
};

  } else if (Prototype.Browser.WebKit) {
isButton = function(event, code) {
  switch (code) {
case 0: return event.which == 1 && !event.metaKey;
case 1: return event.which == 1 && event.metaKey;
default: return false;
  }
};

  } else {
isButton = function(event, code) {
  return event.which ? (event.which === code + 1) : (event.button === code);
};
  }
  return {
isLeftClick:   function(event) { return isButton(event, 0) },
isMiddleClick: function(event) { return isButton(event, 1) },
isRightClick:  function(event) { return isButton(event, 2) },

...

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: `new Element' does not take care to properly set up event attributes in IE

2007-10-19 Thread Richard Quadling
On 19/10/2007, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 10/19/07, Viktor Kojouharov <[EMAIL PROTECTED]> wrote:
> >
> > Mislav, the problem is not whether you are interested in making this
> > work or not, the problem is that `new Element' doesn't behave like a
> > 'prototype' function, since it's not consistent across browsers.
>
> So, to make it work in IE we should special-case "onclick", "onsubmit" etc.
> not to be set with setAttribute.
>
> Any bright idea how we could differentiate those? Names beginning with "on"
> is out of the question.

How bad would it be if the "value" is detected as a function and then
an observe is done based upon the "name".

What is odd is that by passing a function as the value it works in IE
but not in FF.




-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: `new Element' does not take care to properly set up event attributes in IE

2007-10-19 Thread Richard Quadling

On 19/10/2007, Viktor Kojouharov <[EMAIL PROTECTED]> wrote:
>
> This is a really troublesome bug, which is exhibited in IE browsers.
> Consider this code:
>
> new Element('div', {onclick: 'alert(this)'});
>
> In every other browser, this will produce a div, that, when clicked,
> will alert. In IE, on* events are not registered, since internally
> prototype uses setAttribute. setAttribute cannot set these. The only
> way such attributes can be registered is in the createElement method
> itself. For this reason, I've written a drop-in replacement for 'new
> Element' which fixes this issue. I seriously urge you to fix this
> issue (by either using the code below, or using your own methods),
> otherwise `new Element' will not create elements that are identical
> throughout all browsers.
>
> That being said, this is my drop-in replacement:
>
>   (function() {
> var element = this.Element;
> this.Element = function(tagName, attributes) {
>   attributes = attributes || { };
>   tagName = tagName.toLowerCase();
>   var cache = Element.cache;
>   if (Prototype.Browser.IE) {
> var conflicts = $H(attributes).grep(/(?:name|on\w+)/);
> if (conflicts.length) {
>   var attributeString = '';
>   conflicts.each(function (tuple) {
>   delete attributes[tuple[0]];
>   attributeString += tuple[0] + '="' + tuple[1] + '"';
> });
>   tagName = '<' + tagName + ' ' + attributeString + '>';
>   return
> Element.writeAttribute(document.createElement(tagName), attributes);
> }
>   }
>   if (!cache[tagName]) cache[tagName] =
> Element.extend(document.createElement(tagName));
>   return Element.writeAttribute(cache[tagName].cloneNode(false),
> attributes);
> };
> Object.extend(this.Element, element || { });
>   }).call(window);

Here is the code not working. http://pastie.caboo.se/108855

I can get it to work in IE OR FF but not both.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Other API using Object.prototype breaks prototype.js for/in loop

2007-10-29 Thread Richard Quadling

Just in case anyone who isn't german (I assume) is reading this -
verboten === forbidden.

On 24/10/2007, Olivier Jaquemet <[EMAIL PROTECTED]> wrote:
>
>
> > In short, Object prototype is verboten. Prototype library will break if you
> > augment Object.prototype, and this is not likely to change.
> >
> > [...] We could say, json.js is verboten :)
> >
> > I hope this clears up the issue.
>
> This is very clear :)
> I will forward this to the RSH maintainer in hope he will agree :)
> Thanks for you quick answer.
>
> Regards,
> Olivier Jaquemet
>
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Other API using Object.prototype breaks prototype.js for/in loop

2007-10-29 Thread Richard Quadling
On 29/10/2007, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 10/29/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> >
> > Just in case anyone who isn't german (I assume) is reading this -
> > verboten === forbidden.
>
> Do a Google search for "object.prototype is *" and see what verb first pops
> up :)
>
>  http://www.google.com/search?q=object.prototype+is+*
>
> It is a well-known article that was frequently cited.

Thanks for that.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: features request

2007-11-22 Thread Richard Quadling

Here is the Scriptaculous.require method ...

var Scriptaculous = {
  Version: '1.8.0',
  require: function(libraryName) {
// inserting via DOM fails in Safari 2.0, so brute force approach
document.write('

[Prototype-core] Re: Hide / show bug

2007-11-23 Thread Richard Quadling

On 23/11/2007, bixy <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> hide() and show() element function don't work.
> They use element.style.display member directly which always return an
> empty string when using prototypejs

Have you some code we can see? Works for me fine!




-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Event.element Problem

2007-12-12 Thread Richard Quadling
My patch, my patch! Woo hoo!

On 12/12/2007, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> Relevant ticket: http://dev.rubyonrails.org/ticket/8397
>
> This has been reported in the issue tracker multiple times, I closed the
> duplicates.
>
>
>  On Dec 12, 2007 8:00 AM, Andrés Robinet <[EMAIL PROTECTED]> wrote:
> >
> > Hello there,
> >
> > I was experiencing a problem with the Prototype Adapter for ExtJS
> > (http://extjs.com). It happened to me that every time I hit the refresh
> > button in IE 7, I got a JavaScript error popup. Then I tried the fix
> posted
> > at this link
> http://extjs.com/forum/showthread.php?p=97978#post97978 by
> > "splintor" (the last post) as I was using Prototype 1.6. That fixed my
> > problem once and forever.
> >
> > Maybe this is an ExtJS bug which requires patching prototype because it's
> > easier than fixing the adapter... I tried searching the ruby on rails bug
> > tracking system for this bug and didn't find it (Please double check it, I
> > just spent 15 minutes or so trying to find it... maybe it's there, or has
> > another title). Anyway... I just wanted to draw your attention on this, so
> > if this is a Prototype bug you can give it the proper treatment (or you
> can
> > throw some hints and explanations if this is not a bug, that is also
> > welcome).
> >
> > Thanks in advance,
> >
> > Rob
> >
> > > >
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] A question regarding changeset 8548.

2008-01-04 Thread Richard Quadling

Hi.

I have a question which those who know it better may be able to answer.

Shouldn't the order of firing the dom:loaded event and the setting of
document.loaded be swapped?

What I'm thinking is if any event handlers on dom:loaded take a while,
anything trying to see if document.loaded is true isn't going to get
it.

As it stands, the dom isn't loaded until all the observers have
finished executing (I think).

I may have got some or all of this wrong.

Richard.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: A question regarding changeset 8548.

2008-01-04 Thread Richard Quadling

On 04/01/2008, Richard Quadling <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I have a question which those who know it better may be able to answer.
>
> Shouldn't the order of firing the dom:loaded event and the setting of
> document.loaded be swapped?
>
> What I'm thinking is if any event handlers on dom:loaded take a while,
> anything trying to see if document.loaded is true isn't going to get
> it.
>
> As it stands, the dom isn't loaded until all the observers have
> finished executing (I think).
>
> I may have got some or all of this wrong.
>
> Richard.

http://dev.rubyonrails.org/changeset/8548

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Deprecated Section.. gone when?

2008-01-07 Thread Richard Quadling

On 07/01/2008, Kjell Bublitz <[EMAIL PROTECTED]> wrote:
>
> Hi all!
>
> Since we are past "1.6.0 final" i wonder when you will remove the
> deprecated portion of the source.
>
> Best,
> Kjell Bublitz

I do this by hand by adding comment tags around the code. That way, it
is just an uncomment when you realize you are still relying on some
old code!


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: How to get the request parameters from the response?

2008-01-28 Thread Richard Quadling

The response object has a property of request.

One issue I found. If there is an exception, the exception always gets
the request object.

http://dev.rubyonrails.org/ticket/9691

I've sent a patch which would add the response to the request (which
is fed to the exception) to allow an exception to get the whole
picture.

On 28/01/2008, Gareth Evans <[EMAIL PROTECTED]> wrote:
> I always thought the parameter to the callback was just the server reply
> (response)
> The docs show transport as a param, I didn't realise it was an instance of
> the request.
>
> Given this information, you're right, there's not a lot of sense to what i'm
> doing.
>
> After a quick spot of searching the API docs, it is mentioned there..
>
> http://www.prototypejs.org/api/ajax/options
>
> Common callbacks
>
> When used on individual instances, all callbacks (except onException) are
> invoked with two parameters: the XMLHttpRequest object and the result of
> evaluating the X-JSON response header, if any (can be null).
>
> However, you have to actually check Ajax.Response;
> http://www.prototypejs.org/api/ajax/response
> To see what the structure of the first paramter should be.
>
> Is it worth rewording the common callbacks section and providing a link to
> ajax.response here?
> Also a function signature could be included in the common callbacks section.
> Might prevent others from making the same mistake.
>
> Gareth
>
> On Jan 28, 2008 1:29 PM, kangax <[EMAIL PROTECTED]> wrote:
>
> >
> > Gareth,
> >
> > new instance of Ajax.Response is passed as a first argument into a
> > callback. That instance has request property which points to request
> > object (the one that has all your settings/parameters, etc.). I don't
> > really see a reason to do what you're doing.
> >
> > Best,
> > kangax
> >
> >
> >
> > > >
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: samples

2008-01-30 Thread Richard Quadling

On 30/01/2008, sharosh <[EMAIL PROTECTED]> wrote:
>
> hi
>   got you hear about prototype from a friend of mine. im a usablity
> designer so im more intersted in seeing protype in action is there
> some demo's or samples put up in the website, cas i was trying to find
> out in the website  . i would really apperciate if you can help me
> with some URLS for the same..
>
> thanks
> sharosh

Prototype is a library. It doesn't DO anything itself. You have to
create your own applications.

A good example of the use of Prototype is it's sister-in-crime, Scriptaculous.

Lot's of demos - http://script.aculo.us/

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: onXYZ handlers in Ajax.Responders

2008-02-08 Thread Richard Quadling

On 08/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
> Hi,
>
> My site will respond with 503 http code while in maintenance. I want to
> handle this response in ajax requests. Prototype's onXYZ ajax handlers
> suit perfectly for this task. Except for one thing: these handlers aren't
> called when specified in Ajax.Responders, so I will have to include them
> in every request. This is highly inconvenient : (
>
> This problem can be easily solved with just one extra line in
> respondToReadyState (patch applied, and I can post it in trac too), but
> this requires code to be included in core prototype, as handling the
> situation in custom wrapper isn't too easy.
>
> Are there objections against supporting onXYZ handlers in Ajax.Responders?
>
> --
> arty ( http://arty.name )

I've already submitted a more encompassing patch to allow onXYZ and
still allow onSuccess/onFailure.

http://dev.rubyonrails.org/ticket/9690

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: onXYZ handlers in Ajax.Responders

2008-02-08 Thread Richard Quadling

On 08/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
>
> On Fri, 08 Feb 2008 13:23:48 +0300, Richard Quadling
> <[EMAIL PROTECTED]> wrote:
>
> >
> > On 08/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
> >> Hi,
> >>
> >> My site will respond with 503 http code while in maintenance. I want to
> >> handle this response in ajax requests. Prototype's onXYZ ajax handlers
> >> suit perfectly for this task. Except for one thing: these handlers
> >> aren't
> >> called when specified in Ajax.Responders, so I will have to include them
> >> in every request. This is highly inconvenient : (
> >>
> >> This problem can be easily solved with just one extra line in
> >> respondToReadyState (patch applied, and I can post it in trac too), but
> >> this requires code to be included in core prototype, as handling the
> >> situation in custom wrapper isn't too easy.
> >>
> >> Are there objections against supporting onXYZ handlers in
> >> Ajax.Responders?
> >>
> >> --
> >> arty ( http://arty.name )
> >
> > I've already submitted a more encompassing patch to allow onXYZ and
> > still allow onSuccess/onFailure.
> >
> > http://dev.rubyonrails.org/ticket/9690
> >
>
> Great! Though I'm not sure that existence of onXYZ responder should cancel
> onSuccess/onFailure, as this creates multiple ambiguities/problems you've
> noted in comments to that issue.

I'm not so sure. If you have them defined for the current request AND
you have onxyz as a global responder ... By allowing the global
responder to return true/false, you can say what you want to happen in
the current request.

That is the idea.

But even though I use this patch all day, I'm not sure what the core
team think on it.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Event.isLeftClick() vs. click event in IE

2008-02-12 Thread Richard Quadling

On 12/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
>
> You'll be surprised that click _can_ be toggled via keyboard (FF, Opera
> for sure). You may easily test this.
>
> And my first example shows how isLeftClick is broken in IE6. I can't
> forget about IE6.
>

Ah. Yes. on clickable objects (anchors and buttons), sorry. Forgot about those.

But what are you trying to do by watching which mouse button?


> >
> > On 12/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
> >>
> >> I don't want to break keyboard navigation only because of IE problem.
> >>
> >
> > mousedown and click are both non-keyboard events.
> >
> > but click is only for left button.
> >
> > This is true for IE (7 on WinXPSP2) and FF (2.0.0.1 on WinXPSP2).
> >
> > Here is a script to show you...
> >
> > 
> > 
> >  > src="<a  rel="nofollow" href="http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js"">http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js"</a>;>
> > 
> > function clicking(e)
> >   {
> >   $('clicker').update($('clicker').innerHTML + '<br />' +
> > 'You clicked with your ' +
> > (Event.isLeftClick(e) ? 'Left' : '') +
> > (Event.isRightClick(e) ? 'Right' : '') +
> > (Event.isMiddleClick(e) ? 'Middle' : '') +
> > ' button. Event.button = ' + e.button +
> > ' and Event.which = ' + e.which
> > );
> >   }
> > 
> > Testing clicking
> > 
> > 
> > Left, Right or Middle click me!
> > 
> > Event.observe(document.body, 'click', clicking);
> > 
> > 
> > 
> >
> > Try left/right/middle clicking in IE and FF and then change 'click' to
> > 'mousedown' and retest.
> >
> > Hopefully that will show you what we mean.
> >> On Tue, 12 Feb 2008 03:45:22 +0300, tancurrom
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >> >
> >> > I think its just because of the way JavaScript handles the click
> >> > event. Use the 'mousedown' event instead of the 'click' event and you
> >> > will get your results
> >> >
> >> > On Feb 11, 2:42 pm, "artemy tregoubenko" <[EMAIL PROTECTED]>
> >> > wrote:
> >> >> Hello,
> >> >>
> >> >> Event.isLeftClick() is told to differ left clicks from right and
> >> middle
> >> >> clicks. However when I run
> >> >> document.observe('click',
> >> function(event){ alert(event.isLeftClick()); })
> >> >> in IE and then left-click page, I see 'false' in alert. This starts
> >> >> working if you listen to 'mousedown' or 'mouseup' events, but I
> >> don't like
> >> >> this way out.
> >> >>
> >> >> I don't like it because 'click' event may be triggered by keyboard
> >> too,
> >> >> and it's not good to forbid people to use keyboard at your site. I
> >> had an
> >> >> idea to listen for both 'mousedown' and 'click' events, but didn't
> >> manage
> >> >> to differ keyboard and mouse clicks in handler to avoid doubleposts.
> >> >>
> >> >> Is it possible to fix isLeftClick? If not, is there some nice
> >> workaround
> >> >> for this situation?
> >> >>
> >> >> --
> >> >> arty (http://arty.name)
> >> > >
> >> >
> >>
> >>
> >>
> >> --
> >> arty ( http://arty.name )
> >
> >
> >
>
>
>
> --
> arty ( http://arty.name )
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Event.isLeftClick() vs. click event in IE

2008-02-12 Thread Richard Quadling

On 12/02/2008, artemy tregoubenko <[EMAIL PROTECTED]> wrote:
>
> I don't want to break keyboard navigation only because of IE problem.
>

mousedown and click are both non-keyboard events.

but click is only for left button.

This is true for IE (7 on WinXPSP2) and FF (2.0.0.1 on WinXPSP2).

Here is a script to show you...



http://prototypejs.org/assets/2008/1/25/prototype-1.6.0.2.js"</a>;>

function clicking(e)
  {
  $('clicker').update($('clicker').innerHTML + '<br />' +
'You clicked with your ' +
(Event.isLeftClick(e) ? 'Left' : '') +
(Event.isRightClick(e) ? 'Right' : '') +
(Event.isMiddleClick(e) ? 'Middle' : '') +
' button. Event.button = ' + e.button +
' and Event.which = ' + e.which
);
  }

Testing clicking


Left, Right or Middle click me!

Event.observe(document.body, 'click', clicking);




Try left/right/middle clicking in IE and FF and then change 'click' to
'mousedown' and retest.

Hopefully that will show you what we mean.
> On Tue, 12 Feb 2008 03:45:22 +0300, tancurrom <[EMAIL PROTECTED]> wrote:
>
> >
> > I think its just because of the way JavaScript handles the click
> > event. Use the 'mousedown' event instead of the 'click' event and you
> > will get your results
> >
> > On Feb 11, 2:42 pm, "artemy tregoubenko" <[EMAIL PROTECTED]>
> > wrote:
> >> Hello,
> >>
> >> Event.isLeftClick() is told to differ left clicks from right and middle
> >> clicks. However when I run
> >> document.observe('click', function(event){ alert(event.isLeftClick()); })
> >> in IE and then left-click page, I see 'false' in alert. This starts
> >> working if you listen to 'mousedown' or 'mouseup' events, but I don't like
> >> this way out.
> >>
> >> I don't like it because 'click' event may be triggered by keyboard too,
> >> and it's not good to forbid people to use keyboard at your site. I had an
> >> idea to listen for both 'mousedown' and 'click' events, but didn't manage
> >> to differ keyboard and mouse clicks in handler to avoid doubleposts.
> >>
> >> Is it possible to fix isLeftClick? If not, is there some nice workaround
> >> for this situation?
> >>
> >> --
> >> arty (http://arty.name)
> > >
> >
>
>
>
> --
> arty ( http://arty.name )



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Deprecation.js

2008-02-14 Thread Richard Quadling

Hi.

If you comment out from prototype.js the deprecated functions/classes
(I take out the whole Position class for example), then deprecation.js
fails due to the lack of the namespace: Position.

So, using v1.6.0.2, should Position be defined but unused and
therefore be in the global namespace or should it be commented out and
deprecation.js cope with its absence?

(I can't quite decide if this is a core or a spinoff issue).

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Deprecation.js

2008-02-14 Thread Richard Quadling

On 14/02/2008, Tobie Langel <[EMAIL PROTECTED]> wrote:
>
>  Hi Richard,
>
>  Thanks for the thumbs up.
>
>  deprecation.js is meant to be used with prototype.js, not a subset of
>  it, so I don't think that's really an issue for now.
>
>  The plan is to keep this new prototype extension up to date with the
>  changes in Prototype, so once we remove the Position object, we'll add
>  it to deprecation.js.

Aha. Ok. I see. I was getting ahead of the game by taking out
Postition before its time.

Thanks.

>  On Feb 14, 11:02 am, "Richard Quadling" <[EMAIL PROTECTED]>
>  wrote:
>
> > Hi.
>  >
>  > If you comment out from prototype.js the deprecated functions/classes
>  > (I take out the whole Position class for example), then deprecation.js
>  > fails due to the lack of the namespace: Position.
>  >
>  > So, using v1.6.0.2, should Position be defined but unused and
>  > therefore be in the global namespace or should it be commented out and
>  > deprecation.js cope with its absence?
>  >
>  > (I can't quite decide if this is a core or a spinoff issue).
>  >
>  > --
>  > -
>  > Richard Quadling
>  > Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731
>  > "Standing on the shoulders of some very clever giants!"
>
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Deprecation.js

2008-02-15 Thread Richard Quadling

On 14/02/2008, Richard Quadling <[EMAIL PROTECTED]> wrote:
> On 14/02/2008, Tobie Langel <[EMAIL PROTECTED]> wrote:
>  >
>  >  Hi Richard,
>  >
>  >  Thanks for the thumbs up.
>  >
>  >  deprecation.js is meant to be used with prototype.js, not a subset of
>  >  it, so I don't think that's really an issue for now.
>  >
>  >  The plan is to keep this new prototype extension up to date with the
>  >  changes in Prototype, so once we remove the Position object, we'll add
>  >  it to deprecation.js.
>
>
> Aha. Ok. I see. I was getting ahead of the game by taking out
>  Postition before its time.
>
>  Thanks.
>
>
>  >  On Feb 14, 11:02 am, "Richard Quadling" <[EMAIL PROTECTED]>
>  >  wrote:
>  >
>  > > Hi.
>  >  >
>  >  > If you comment out from prototype.js the deprecated functions/classes
>  >  > (I take out the whole Position class for example), then deprecation.js
>  >  > fails due to the lack of the namespace: Position.
>  >  >
>  >  > So, using v1.6.0.2, should Position be defined but unused and
>  >  > therefore be in the global namespace or should it be commented out and
>  >  > deprecation.js cope with its absence?
>  >  >
>  >  > (I can't quite decide if this is a core or a spinoff issue).

Would it be possible to add a version number/build number to the
extension please.


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Attaching event to instance of object in class

2008-02-15 Thread Richard Quadling

On 14/02/2008, kojilab <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I have a class with DOM elements as properties. I want to bind events
>  within the class to the ements. Unfortunately I am getting an error
>  telling me those properties are not defined. Here's an simplfied
>  example of what I'm trying to achieve.
>
>  var MyClass=Class.create()
>  MyClass.prototye = {
>   initialize: function(element1, element2){
> this.element1=element1;
> this.element2=element2;
>
>   },
>
>   hide: function(){
> this.element2.hide();
>   }
>  }

Can you try ...

var MyClass=Class.create()
MyClass.prototye = {
 initialize: function(element1, element2){
   this.element1=$(element1);
   this.element2=$(element2);
   this.element1.observe('click', this.hide).bindAsEventListener(this);
 },

 hide: function(){
   this.element2.hide();
 }
}

Not sure what you are observing, so chose click.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: OO concept in prototypejs

2008-03-05 Thread Richard Quadling

On 05/03/2008, vtsuper <[EMAIL PROTECTED]> wrote:
>
>  There are 2 classes FormExt, AjaxRequest
>  I create a FormExt object and when the user submit the form, then I
>  will call another AjaxRequest Object
>  When the AjaxRequest finish the process, then it will trigger
>  onComplete
>
>  I would like the onComplete method will call the FormExt.reset()
>  so hwo to do this?
>  I must pass the FormExt obj to the AjaxRequest??? and other method???
>
>  var FormExt = Class.create({
> initialize: function(id){
> this.id=id;
> this.obj=$(this.id);
> this.ajaxObj='';
>
> this.eventSubmit=this.submit.bindAsEventListener(this);
> Event.observe(this.id, 'submit', this.eventSubmit);
> },
>
> submit:function(e){
> this.ajaxObj=new AjaxForm(this.id);
> this.ajaxObj.startAjax();
> break;
> },
>
> reset:function(){
> this.obj.reset();
> }
>  });
>
>  var AjaxRequest = Class.create({
> initialize: function(id){
> this.frmObj=$(id);
> this.ajaxObj='';
> },
>
> startAjax: function(){
> this.ajaxObj = new Ajax.Request(
> 'abc.php',{
> onComplete:this.onComplete.bind(this)
> }
> );
> }
>
> onComplete:function(){
> alert('complete now');
> }
>  });

var AjaxRequest = Class.create
({
initialize: function(id)
{
this.frmObj=$(id);
this.ajaxObj='';
},

startAjax: function()
{
this.ajaxObj = new Ajax.Request
(
'abc.php',
{
onComplete:function()
{
alert('complete now');
this.formObj.reset();
    }
}
}
});

maybe.

Sorry for the reform. Makes it easier for me to read.

Basically added

this.formObj.reset();

to the onComplete function.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Prototype 1.6.0 API docs CHM version

2008-04-17 Thread Richard Quadling

On 17/04/2008, remix <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>  i have created a new compilation of Prototype 1.6.0 API docs
>  in CHM format:
>
>  http://show.samesystem.dk/public/Prototype-v1.6.0.chm
>
>  Hope that will be useful :)
>
>  Regards,
>  Remi

Woo Hoo!

Thank you very much.




-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Timeline for supporting native array methods?

2008-04-18 Thread Richard Quadling

On 17/04/2008, Tobie Langel <[EMAIL PROTECTED]> wrote:
>  Changing versioning system (svn to git)

What tools/software will be needed to download trunk, et al.

I use TortoiseCVS and TortoiseSVN (all for Windows). Should I be
looking for TortoiseGIT now?

Why the change?



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Timeline for supporting native array methods?

2008-04-19 Thread Richard Quadling

On 19/04/2008, John-David Dalton <[EMAIL PROTECTED]> wrote:
>
>  Hi Richard,
>
>  I was a little bummed by the switch at first as well.
>  Now though I am beginning to see the cool side of it.
>
>  For example before when you wanted to contribute you had to make a
>  patch that would only work for the current version of Prototype and
>  probably not the version that was in SVN (SVN is very picky about
>  patches).
>
>  With Git and GitHub you can create a forked repo of prototype.
>  Commit your changes to it and send the core devs a "pull" request.
>  Then they merge the changes into their repo :).
>
>  Also this allows you to target a specific dev or group of devs and
>  there are lots of options with Git.
>  GitHub is hooked into Lighthouse (Prototype's new home for bug
>  tracking) as well.
>  It is command line at the time and the GUI's for it are very very
>  basic.
>
>  I am still learning it. I did have some issues getting my fork to
>  pulldown, turns out I needed to log into my "pull" address via putty
>  first to get it to save some registry info. Here are some links:
>
>  Windows version of Git:
>  http://code.google.com/p/msysgit/downloads/list
>
>  Helpful links:
>  http://www.sourcemage.org/Git_Guide
>  http://www.kenegozi.com/Blog/2008/04/01/gitself-take-one.aspx
>  http://github.com/guides

Thanks for that. Can't wait for a Tortoise. It would almost be worth
building a TortoiseAnything which provides an interface for
CVS/SVN/GIT/etc to plug into. I bet the boffins are working on this
right now.

Thanks again.

Richard.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: String methods

2008-04-22 Thread Richard Quadling
On 22/04/2008, braudes <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
>  I notice that the String class doesn´t have some simple methods. So, I
>  added these:
>
>  ltrim: function() {
> var re = /\s*((\S+\s*)*)/;
> return this.replace(re, "$1");
>   },
>
>   rtrim: function() {
> var re = /((\s*\S+)*)\s*/;
> return this.replace(re, "$1");
>   },
>
>   trim: function() {
> return this.rtrim().ltrim();
>   },
>
>   invert: function() {
> var len = this.length;
> var str = "";
> for (var i = len - 1; i > -1 ;i--){
> str += this.charAt(i);
> }
> return str;
>   }

I think we'll all got variations on this ...
addCommas : function(s_Decimal, s_Thousand, s_SplitDecimalUsing){
return addCommas(this, s_Decimal, s_Thousand, s_SplitDecimalUsing);
},
left : function(i_Len){
return this.substring(0, i_Len);
},
lTrim : function(s_Trim){
return this.replace(((0 == arguments.length) || '' == s_Trim) ?
"/^\\s+/" : "/^" + s_Trim + "+/", '');
},
mid : function(i_Start, i_End){
i_Start = (!i_Start) ? 0 : i_Start;
i_End = (!i_End || i_End > this.length) ? this.length : i_End;
i_End = (i_End != this.length) ? i_Start + i_End : i_End;
return this.substring(i_Start, i_End);
},
pad : function(i_padLen, s_padStr, i_padType){
return s_padStr || (s_padStr = " "), (i_padLen -= this.length) > 0 ?
(s_padStr = new Array(Math.ceil(i_padLen / s_padStr.length) +
1).join(s_padStr)).substr(0, i_padType = !i_padType ? i_padLen :
i_padType == 1 ? 0 : Math.ceil(i_padLen / 2)) + this +
s_padStr.substr(0, i_padLen - i_padType) : this;
},
right : function(i_Len){
return this.substring((this.length - i_Len), this.length);
},
rTrim : function(s_Trim){
return this.replace((0 == arguments.length) ? "/\\s+$/" : "/" +
s_Trim + "+$/", '');
},
trim : function(s_Trim){
if (0 == arguments.length){
return this.replace(/^\s+|\s+$/g, '');
} else {
return this.lTrim(s_Trim).rTrim(s_Trim);
}
}

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: String methods

2008-04-22 Thread Richard Quadling
On 22/04/2008, Richard Quadling <[EMAIL PROTECTED]> wrote:
> On 22/04/2008, braudes <[EMAIL PROTECTED]> wrote:
>  >
>  >  Hi,
>  >
>  >  I notice that the String class doesn´t have some simple methods. So, I
>  >  added these:
>  >
>  >  ltrim: function() {
>  > var re = /\s*((\S+\s*)*)/;
>  > return this.replace(re, "$1");
>  >   },
>  >
>  >   rtrim: function() {
>  > var re = /((\s*\S+)*)\s*/;
>  > return this.replace(re, "$1");
>  >   },
>  >
>  >   trim: function() {
>  > return this.rtrim().ltrim();
>  >   },
>  >
>  >   invert: function() {
>  > var len = this.length;
>  > var str = "";
>  > for (var i = len - 1; i > -1 ;i--){
>  > str += this.charAt(i);
>  > }
>  > return str;
>  >   }
>
>
> I think we'll all got variations on this ...
>  addCommas : function(s_Decimal, s_Thousand, s_SplitDecimalUsing){
> return addCommas(this, s_Decimal, s_Thousand, s_SplitDecimalUsing);
>  },
>  left : function(i_Len){
> return this.substring(0, i_Len);
>  },
>  lTrim : function(s_Trim){
> return this.replace(((0 == arguments.length) || '' == s_Trim) ?
>  "/^\\s+/" : "/^" + s_Trim + "+/", '');
>  },
>  mid : function(i_Start, i_End){
> i_Start = (!i_Start) ? 0 : i_Start;
> i_End = (!i_End || i_End > this.length) ? this.length : i_End;
> i_End = (i_End != this.length) ? i_Start + i_End : i_End;
> return this.substring(i_Start, i_End);
>  },
>  pad : function(i_padLen, s_padStr, i_padType){
> return s_padStr || (s_padStr = " "), (i_padLen -= this.length) > 0 ?
>  (s_padStr = new Array(Math.ceil(i_padLen / s_padStr.length) +
>  1).join(s_padStr)).substr(0, i_padType = !i_padType ? i_padLen :
>  i_padType == 1 ? 0 : Math.ceil(i_padLen / 2)) + this +
>  s_padStr.substr(0, i_padLen - i_padType) : this;
>  },
>  right : function(i_Len){
> return this.substring((this.length - i_Len), this.length);
>  },
>  rTrim : function(s_Trim){
>     return this.replace((0 == arguments.length) ? "/\\s+$/" : "/" +
>  s_Trim + "+$/", '');
>  },
>  trim : function(s_Trim){
> if (0 == arguments.length){
> return this.replace(/^\s+|\s+$/g, '');
> } else {
> return this.lTrim(s_Trim).rTrim(s_Trim);
> }
>  }

The addCommas shouldn't be there. Cut'n'paste error.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Using GIT

2008-04-25 Thread Richard Quadling

Hi.

Where do I point my git to get RubySpinoffs now? Or is git now only
for prototype?

I assume once I've got the spin offs, I am still using rake dist to
build my version for testing?


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: [Rails Trac] #11481: [PATCH] [TEST] Constructor wrapper should return value

2008-04-28 Thread Richard Quadling

2008/4/28 Rails Trac <[EMAIL PROTECTED]>:
> #11481: [PATCH] [TEST] Constructor wrapper should return value
>  ---+
>   Reporter:  cch1   |Owner:  sam
>  Type:  defect |   Status:  closed
>
>  Priority:  normal |Milestone:  2.x
>  Component:  Prototype  |  Version:  edge
>   Severity:  normal |   Resolution:  wontfix
>
>  Keywords:  TRIVIAL constructor initialize return  |
>  ---+
>  Changes (by jdalton):
>
>   * status:  new => closed
>   * resolution:  => wontfix
>
>  Comment:
>
>   After some discussions I don't believe this will ever make it into the
>   core.
>
>  --
>  Ticket URL: <http://dev.rubyonrails.org/ticket/11481#comment:9>

In general, having class X being able to return class Y can be very
useful (implementing a factory for example).

I'm not saying that this SHOULD go in, but what are the primary
reasons for NOT putting it in?

Thanks.

Richard Quadling.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Version numbers.

2008-04-30 Thread Richard Quadling

Hi.

With the new git repository, is there any chance of having version
numbers in the src files which are automatically updated by commits to
git?

I know this is possible with both CVS and SVN (but SVN didn't have
branches so you only had 1 sequence). Not sure about git yet. Looking
forward to some clever people getting a TortoiseGIT (don't look at me!
I'm just a user).

Regards,

Richard.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] GIT's equivalent of the ChangeSet number.

2008-05-09 Thread Richard Quadling

Hi.

I'm new to GIT. I've used CVS and SVN.

With CVS, version numbers could be automatically updated within the
file so you know from the version numbers you knew if you were upto
date or not as the number was human readable ((lcoal) 1.2.3 vs (cvs)
1.2.4 for example).

With SVN, you could see the last changeset number to know if you were
uptodate. In my mind, having the number in the file would have been
nice, but that's only cause I'm use to it from CVS. The changeset
numbers are useful as they are sequential and like a cross-project
commit whereas in CVS each commit is to a file. (As I understand
things only being a user of these tools!).

With GIT, the changeset numbers are meaningless and there is no
version number in the file.


I feel like I've lost something. I'm not sure I have, I just feel like it.

What is the normal way these tools are supposed to be used?

Am I supposed to blindly update each time I want to work on the code?

This isn't finger pointing or anything, I'm just wondering how I'm
supposed to work without versioning.

Regards,

Richard.


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: A callbacks module for adding before/after hooks to object methods

2008-05-15 Thread Richard Quadling

2008/5/14 Pat Nakajima <[EMAIL PROTECTED]>:
>
> I've started putting together a way to specify per-object before/after
> callbacks for any method. Probably not something to go in core, but
> maybe something that would be interesting to core contributors.
>
> There are some examples in a GitHub wiki (http://github.com/nakajima/
> nakatype/wikis/callbacks), but basically, you specify callbacks like
> so:
>
>  var someArray = [1,2,3];
>
>  Callbacks.add(someArray, {
>before: {
>  push: function(entry) {
>var msg = 'about to push ' + entry + ' on array: ' +
> this.join(', ');
>console.info(msg);
>  }
>},
>
>after: {
>  push: function(entry) {
>var msg = 'just pushed ' + entry + ' on array: ' +
> this.join(', ');
>console.info(msg);
>  }
>}
>  });
>
>  someArray.push(4);
>
> In addition to adding 4 to someArray, the above code snippet will log
> to the console before and after.
>
> If anybody has any suggestions/criticisms/threats, please do share!

A very useful idea.

How far is it from simple before/after callbacks to a full AOP implementation?

Where I can see this being of instant use is the ability to develop a
class with no logging/diagnostics from day 1 and have a drop-in
before/after logger which wouldn't upset the main class.

Rather than having to name the methods, it would be great to be able
to wildcard/regex them ( /[sg]et.+/ for example) as well as allowing
all with an exclude mechanism (allow the high use methods to NOT be
logged).

I used to do Delphi development for a Point of Sale system. One of the
issues that we had was the user would say the calculation was wrong.
By using a plugin we could effectively record all the values of all
the calculations and the source of the values and produce a report of
any calculation. Remove the plugin and the app did nothing. All the
hooking and recording was in the plugin. This was useful especially
when you are converting costs with markups for bulk quantities
converted between buying and selling units.

It is in keeping with the "unobtrusive" nature of much JS code.

I think the callback handler should be available as an extension (like
the deprecated.js one is). So, officially supported/recognised, but
not built-in as standard.

Maybe amend the rake dist process to allow those with the skills to
build their own prototype.js with the required extensions built in.





-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: A callbacks module for adding before/after hooks to object methods

2008-05-15 Thread Richard Quadling

2008/5/15 Pat Nakajima <[EMAIL PROTECTED]>:
>
> With regards to your desire to skip the callbacks for some methods,
> you can actually call methodWithoutCallbacks to call a method sans-
> callbacks.
>
> I think that the wildcard/regex idea is neat, though I'm not sure how
> it could be accomplished unobtrusively. I could imagine overriding all
> of the object's methods to be called through a sort of method handler
> (similar to what I was playing with when I created this lazy class:
> http://github.com/nakajima/nakatype/tree/master/src/lazy_class.js),
> then having the method handler match callbacks to called methods. It
> seems a bit cleaner than my example, though it doesn't quite feel
> right still.
>

This is top of my head stuff.

// Allow the wrapping of many different methods.
Callback.addWrappers : function(klass_ToWrap, before/after/around,
{array of methods}/"single method"/regex, klass_Payload.Payload)

// Allow the wrapping of all methods except those supplied.
Callback.addWrappersAllBut : function(klass_ToWrap,
before/after/around, {array of methods}/"single method"/regex,
klass_Payload.Payload)

Param 1 : klass_ToWrap is the class to which we are going to wrap some
additional behaviour.

Param 2 : before/after/around is 1 of the three ways to wrap the
behaviour : before only, after only or around which is both before and
after.

Param 3 : {array of methods}/"single method"/regex : allow an array of
known methods to be wrapped, a single method or a regex

Param 4 : the method to call. The first argument in the callback will
be to indicate if it is before or after. This allows for a single
method to be wrapped "around" another. The other parameters need to be
the parameters passed to the klass_ToWrap method.


I would guess that there would be a "private" method which did the
wrapping for a single source class method. So both Callback methods
iterate the list of supplied methods and call the "private" method to
do the wrapping.


So, in the JS file that defines the logging class (which would need to
be loaded after prototype.js, the callback handling class and the
klass_being_wrapped), ...

var klass_Logging = Class.create({

  // Use Firebug's console to show trace.
  Logging : function(b_Before, s_Klass, s_Method) {
   switch(b_Before) {
case true :
 console.group('Entering ' + s_Klass + '.' + s_Method + '(',
arguments, ')');
 break;
default :
 console.groupEnd();
   }
  }
});

// Add Firebug tracing to klass_ToWrap
Callback.addWrappers(klass_ToWrap, 'around', /*/, klass_Logging.Logging);



> I'm actually not so familiar with AOP, so perhaps after I spend some
> time with that, I'll be able to tackle some of these ideas.
>
> On May 15, 8:17 am, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
>> 2008/5/14 Pat Nakajima <[EMAIL PROTECTED]>:
>> > I've started putting together a way to specify per-object before/after
>> > callbacks for any method. Probably not something to go in core, but
>> > maybe something that would be interesting to core contributors.
>>
>> > There are some examples in a GitHub wiki (http://github.com/nakajima/
>> > nakatype/wikis/callbacks), but basically, you specify callbacks like
>> > so:
>>
>> >  var someArray = [1,2,3];
>>
>> >  Callbacks.add(someArray, {
>> >before: {
>> >  push: function(entry) {
>> >var msg = 'about to push ' + entry + ' on array: ' +
>> > this.join(', ');
>> >console.info(msg);
>> >  }
>> >},
>>
>> >after: {
>> >  push: function(entry) {
>> >var msg = 'just pushed ' + entry + ' on array: ' +
>> > this.join(', ');
>> >console.info(msg);
>> >  }
>> >}
>> >  });
>>
>> >  someArray.push(4);
>>
>> > In addition to adding 4 to someArray, the above code snippet will log
>> > to the console before and after.
>>
>> > If anybody has any suggestions/criticisms/threats, please do share!
>>
>> A very useful idea.
>>
>> How far is it from simple before/after callbacks to a full AOP 
>> implementation?
>>
>> Where I can see this being of instant use is the ability to develop a
>> class with no logging/diagnostics from day 1 and have a drop-in
>> before/after logger which wouldn't upset the main class.
>>
>> Rather than having to name the methods, it would be great to be able
>> to wildcard/regex them ( /[sg]et.+/ for example) as well

[Prototype-core] Something odd in selector.js

2008-05-28 Thread Richard Quadling
Hi.

I'm just looking at a recent git checkout of prototype.

Having rake dist'd it, I then diff it against my copy which has some
patches that I've submitted a while back to trac.

I noticed that a few tabs have crept in (dom.js, event.js and string.js)

I don't know what the coding styles are, but there are also blank
lines with spaces only. These are removed by rake dist, so maybe not
important.

But what I did spot was in selector.js, lines 656-667.

There are duplicate operators.

I think lines 662 and 663 should be removed.

2 patches supplied (srctabs.diff and selector.diff) for review.

Regards,

Richard Quadling.
-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



selector.diff
Description: Binary data


srctabs.diff
Description: Binary data


[Prototype-core] Re: typeof returning "object" for certain 'native' functions in IE

2008-06-06 Thread Richard Quadling

2008/6/6 artemy tregoubenko <[EMAIL PROTECTED]>:
>
> Some other functions:
>>> typeof setTimeout
> object
>>> typeof clearTimeout
> object
>>> typeof setInterval
> object
>>> typeof clearInterval
> object
>
> Thus:
>>> typeof setTimeout.defer
> undefined
>>> typeof setTimeout.delay
> undefined
>>> typeof setTimeout.curry
> undefined
>
>
> On Fri, 06 Jun 2008 14:08:24 +0400, T.J. Crowder <[EMAIL PROTECTED]>
> wrote:
>
>>
>> OMG, I can confirm this, on IE6 anyway.  (Couldn't they get *anything*
>> right?  I mean, I know Firefox has its issues, but...  And yes,
>> technically a function is an object, but that's no excuse.)
>>
>> The only workaround that immediately comes to mind is to actually have
>> a list of these and compare against them in IE -- e.g.:
>>
>> isFunction: (function(){
>> if (typeof window.close == "object") {
>> // IE version, works around typeof returning "object" for
>> intrinsic functions
>> return function(object) {
>> return (
>> typeof object == "function"
>> || object === window.close
>> || object === document.getElementById
>> // etc., etc., etc.
>> );
>> };
>> } else {
>> // Non-IE version, expects typeof to work correctly
>> return function(object) {
>> return typeof object == "function";
>> };
>> }
>> })()
>>
>> Blech.  The more of this that happens, the more I want a separate file
>> that only IE people have to download containing these workarounds...
>> --
>> T.J. Crowder
>> tj / crowder software / com
>>
>> On Jun 6, 9:27 am, Viktor Kojouharov <[EMAIL PROTECTED]> wrote:
>>> Here's quite the problem in IE.
>>>
>>> For certain 'native' functions, like window.close, or
>>> document.getElementById, typeof for those functions returns on object
>>> in IE. Consequently, Object.isFunction will actually return false for
>>> those functions.
>>>
>>> Though there's probably little that can be done, I thought you guys
>>> should know about it.
>> >
>
>
>
> --
> arty ( http://arty.name )
>
> >
>


Thinking out loud ... if it is an object, what are it's properties?
Can the presence of one of these be enough to act as a confirmation
for isFunction()?



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: typeof returning "object" for certain 'native' functions in IE

2008-06-06 Thread Richard Quadling

2008/6/6 T.J. Crowder <[EMAIL PROTECTED]>:
>
> Yeah, Richard's approach would be about eight times more elegant...if
> there were something reliable to test for.  It can be IE-specific, of
> course.  I was sure when I saw his post that there would be
> *something* we could check for, but none of the things that come to
> mind are both present (IE doesn't have arity) and sufficiently unique
> (see Kangax's comments about call, apply, etc.).  (BTW, don't try to
> iterate the properties of an intrinsic function object using for..in
> with IE6 on XP; Bad Things happen.)
>
> Sadly my big list approach just won't work, it will always have holes
> in it.  For example:
>
>var x = document.createElement("p");
>if (Object.isFunction(x.getAttribute)) { ... }
>
> So between the holes and the bloat involved in handling even the ones
> we could handle, I'd say we just mention it in Object.isFunction's
> docs and move on, until/unless someone finds the magic thing.
> --
> T.J. Crowder
> tj / crowder software / com
>
> On Jun 6, 12:51 pm, kangax <[EMAIL PROTECTED]> wrote:
>> I wish it was that easy : ) Unfortunately, we can't really account for
>> all host objects, which are notorious for their incompliance with
>> specs (e.g. it's well known how some of them have no constructor
>> property, and others throw error when accessing certain properties).
>> Hardcoding few methods barely solves the problem.
>> We could of course check for "apply/call" members on an object, but
>> guess what - those are undefined as well : )
>> As far as I remember jQuery calls object's toString, then tests if
>> result contains "function". That's clever, but unreliable, as any
>> other object which defines "toString" to return something that
>> contains "function" will produce falsy results.
>>
>> - kangax
>>
>> On Jun 6, 6:08 am, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
>>
>> > OMG, I can confirm this, on IE6 anyway.  (Couldn't they get *anything*
>> > right?  I mean, I know Firefox has its issues, but...  And yes,
>> > technically a function is an object, but that's no excuse.)
>>
>> > The only workaround that immediately comes to mind is to actually have
>> > a list of these and compare against them in IE -- e.g.:
>>
>> > isFunction: (function(){
>> > if (typeof window.close == "object") {
>> > // IE version, works around typeof returning "object" for
>> > intrinsic functions
>> > return function(object) {
>> > return (
>> > typeof object == "function"
>> > || object === window.close
>> > || object === document.getElementById
>> > // etc., etc., etc.
>> > );
>> > };
>> > } else {
>> > // Non-IE version, expects typeof to work correctly
>> > return function(object) {
>> > return typeof object == "function";
>> > };
>> > }
>>
>> > })()
>>
>> > Blech.  The more of this that happens, the more I want a separate file
>> > that only IE people have to download containing these workarounds...
>> > --
>> > T.J. Crowder
>> > tj / crowder software / com
>>
>> > On Jun 6, 9:27 am, Viktor Kojouharov <[EMAIL PROTECTED]> wrote:
>>
>> > > Here's quite the problem in IE.
>>
>> > > For certain 'native' functions, like window.close, or
>> > > document.getElementById, typeof for those functions returns on object
>> > > in IE. Consequently, Object.isFunction will actually return false for
>> > > those functions.
>>
>> > > Though there's probably little that can be done, I thought you guys
>> > > should know about it.
> >
>

What about a process of reduction? Those that can be id'd successfully
by having a particular property then that solves them. The remaining
ones ...

And as much it pains me ... is it about time we had a
browser_version_compatibility_plugin.js ?

That way, for those that need to support clients with ie6, then they
load the ie6 compatible layer. sort of thing. Hmm. There are a LOT of
browsers and versions aren't there?

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: New Name for Users Group (RoR Spinoffs)

2008-06-17 Thread Richard Quadling
For keeping them all guessing ...

'"Your Sprout", A Sceptic Plot'

2008/6/17 kangax <[EMAIL PROTECTED]>:

>
> TJ,
>
> Why "users" postfix? : )
> Why not just "Prototype & Scriptaculous"?
>
> - kangax
>
> On Jun 17, 1:57 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> > Hi folks,
> >
> > I've been chatting today with Tobie about renaming / replacing the RoR
> > Spinoffs mailing list (there's a thread about it over there[1]).
> > Rationale and discussion over there, but the short version is that
> > pretty much everyone agrees we should do it, and so Tobie and I were
> > talking about mechanics and transition.
> >
> > So we need to think of a new name.  I made a suggestion in the thread,
> > I made a suggestion that no one really commented on either way.  I'll
> > revise it slightly:  My suggestion is "Prototype and Scriptaculous
> > Users" ([EMAIL PROTECTED]).  Boring, but
> > fairly clear.
> >
> > Tobie suggested we should discuss the name here.  What do you think?
> > Better ideas?
> > --
> > T.J. Crowder
> > tj / crowder software / com
> >
> > [1] -
> http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thr...
> >
>


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Observing the Right-click (for good, not evil)

2008-06-24 Thread Richard Quadling
2008/6/24 Keith Hughitt <[EMAIL PROTECTED]>:

> On a similar note, anyone know a way to watch for double right-clicks?
> I can stop the context-menu from opening, and pick up double-left
> clicks
> easily enough, but the right clicks seem to be counted as discrete
> clicks, and never a single 'double-click.'
>
> On Apr 24 2007, 6:55 am, "Richard Quadling" <[EMAIL PROTECTED]>
> wrote:
> > Just reading through the patches for this in Trac
> > (
> http://dev.rubyonrails.org/changeset/6537andhttp://dev.rubyonrails.org/ticket/7520
> ).
> >
> > I've added some notes there to explain my code. I've tested this on
> > WinXP SP2 with IE7, Opera9 and FF2. All with slightly different
> > results.
> >
> > On 24/04/07, Richard Quadling <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > Hi.
> >
> > > I didn't realise that the Event.button and Event.which values were
> > > different 'tween IE and FF.
> >
> > > 
> > > 
> > >  > > src="/global/javascript/prototype/prototype.js">
> > > 
> > > function clicking(e)
> > >   {
> > >   alert
> > > (
> > > 'You clicked with your ' +
> > > (Event.isLeftClick(e) ? 'Left' : '') +
> > > (Event.isRightClick(e) ? 'Right' : '') +
> > > (Event.isMiddleClick(e) ? 'Middle' : '') +
> > > '. Event.button which was ' + e.button +
> > > ' and Event.which was ' + e.which
> > > );
> > >   }
> > > function extendEvent()
> > >   {
> > >   Object.extend
> > > (
> > > Event,
> > >   {
> > >   WHICH_LEFT:   (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 1,
> > >   WHICH_RIGHT:  (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 3,
> > >   WHICH_MIDDLE: (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 2,
> > >   MOUSE_LEFT:   (navigator.appVersion.match(/\bMSIE\b/)) ? 1 : 0,
> > >   MOUSE_RIGHT:  (navigator.appVersion.match(/\bMSIE\b/)) ? 2 : 2,
> > >   MOUSE_MIDDLE: (navigator.appVersion.match(/\bMSIE\b/)) ? 4 : 1,
> >
> > >   isLeftClick: function(event)
> > > {
> > > return (((event.which) && (event.which == Event.WHICH_LEFT)) ||
> > > ((event.button) && (event.button ==
> Event.MOUSE_LEFT)));
> > > },
> >
> > >   isRightClick: function(event)
> > > {
> > > return (((event.which) && (event.which == Event.WHICH_RIGHT))
> ||
> > > ((event.button) && (event.button ==
> Event.MOUSE_RIGHT)));
> > > },
> >
> > >   isMiddleClick: function(event)
> > > {
> > > return (((event.which) && (event.which == Event.WHICH_MIDDLE))
> ||
> > > ((event.button) && (event.button ==
> Event.MOUSE_MIDDLE)));
> > > }
> > >   }
> > > );
> > >   }
> > > 
> > > Testing clicking
> > > 
> > > 
> > > Left, Right or Middle click me!
> > > 
> > > Event.observe(document.body, 'mousedown', clicking);
> > > Event.observe(window, 'load', extendEvent);
> > > 
> > > 
> > > 
> >
> > > This is sort of working in IE and FF. In IE I don't get the context
> > > menu but I do in FF (IE7 and FF2.0.0.3)
> >
> > > I think that the middle and right button detection should be added to
> > > Prototype. The current Left button detection is flawed according to my
> > > tests as Event.button == 0 for Left.
> >
> > > I hope this makes some sense.
> >
> > > Richard.
> >
> > > On 23/04/07, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> >
> > > > And this fails in Safari, with a work-around posted on Trac of "just
> > > > don't use Event.Observe..." which is icky.
> >
> > > > Click it is...
> >
> > > > Walter
> >
> > > > On Apr 23, 2007, at 11:54 AM, Walter Lee Davis wrote:
> >
> > > > > Maybe I'll just
> > > > > try using adouble-click instead...
> >
> > > --
> > > -
> > > Richard Quadling
> > > Zend Certified Engineer :
> http://zend.com/zce.php?c=ZEND002498&am

[Prototype-core] Fwd: Where is the source?

2008-09-11 Thread Richard Quadling

-- Forwarded message --
From: Richard Quadling <[EMAIL PROTECTED]>
Date: 2008/9/11
Subject: Where is the source?
To: [EMAIL PROTECTED]


2008/9/10 Lighthouse <[EMAIL PROTECTED]>:
> // Add your reply above here
> ==
> John-David Dalton updated this ticket at September 10, 2008 21:13
>
> *no worries ya thats the trunk (its going through some reorganization but the 
> fix should be in the events.js)
> 
>
> State: resolved
> Milestone: 1.6.0.3
> View this ticket online: 
> http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-pointer-function-on-ie.
> Stop being notified of this ticket's changes: 
> http://prototype.lighthouseapp.com/projects/8886/tickets/4-error-in-pointer-function-on-ie/watch
> Update your Profile: http://prototype.lighthouseapp.com/profile
>

According to http://github.com/sstephenson/prototype/tree/master

git clone git://github.com/sstephenson/prototype.git

is the command to retrieve the source, but I don't seem to have
anything different from at least 25th July 2008.

In looking at the source at
http://github.com/sstephenson/prototype/tree/master/src this confirms
my suspicion.

Where is the source that you all actively write to?

Regards,

Richard.
--
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Fwd: Where is the source?

2008-09-12 Thread Richard Quadling

2008/9/12 John-David Dalton <[EMAIL PROTECTED]>:
>
> The core devs are in the process of cleaning up the 1.6.0.3 release:
> You may check Tobies 1.6.0.3 branch:
> http://github.com/tobie/prototype/tree/1.6.0.3
>
> - JDD
> >
>

I see. I would have thought that prototype would have been in the same
place for all branches.

I'm used to working with CVS and have tags and branches.

Didn't realize git required a completely different repository for a branch.

So what happens if (for arguments sake), Tobie decides to up and
leave, closing the github?



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Fwd: Where is the source?

2008-09-13 Thread Richard Quadling

2008/9/13 John-David Dalton <[EMAIL PROTECTED]>:
>
> Richard you don't have to clone a repo to create a branch.
>
> Devs are free to clone any public git repo of their choosing.
> Some devs/contributors have cloned the Prototype repo to add custom
> extensions/method.
> You are correct that the official code branch has not been updated
> since late July.

Ah! I see. Ok. Thank you for your patience. Me just being a bit dim. Sorry.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Just got notified of a new version ...

2008-09-29 Thread Richard Quadling

Hi.

Just got notified of a new version of Prototype by UpdateScout.

I have a small script which pulls the git to me and then rake's the dist.

=
@ECHO OFF
SETLOCAL
PUSHD
CD /D "D:\CVS+SVN+GIT Checkouts\git\prototype"
git pull
CALL RAKE dist
=

This has worked in the past on V1.6. The same technique worked when
Prototype was on SVN.

Didn't seem to work today. The log is at the bottom of the email.

I don't make any amendments to the local store. Instead, once raked, I
do a DIFF to my version so I can see what has been changed and make my
own additions.


I wiped the local version and ran ...

git clone git://github.com/sstephenson/prototype.git

Then I re-ran my script, which theoretically didn't need to get
anything from github and should be quite happy to rake dist.

And it was.

So, I suspect this is a PICNIC, but just letting you know in case its not.

Regards,

Richard.

=ERRORS=


remote: Counting objects: 353, done.
remote: Compressing objects: 100% (133/133), done.
remote: Total 320 (delta 240), reused 253 (delta 186)
Receiving objects: 100% (320/320), 45.51 KiB, done.
Resolving deltas: 100% (240/240), completed with 28 local objects.
>From git://github.com/sstephenson/prototype
 * [new branch]  array  -> origin/array
 * [new branch]  experimental -> origin/experimental
 + ab8895f...34ee207 master -> origin/master  (forced update)
 * [new branch]  rewrite-> origin/rewrite
 * [new tag] 1.6.0.3-> 1.6.0.3
Renamed test/lib/template.erb => test/lib/templates/prototype.erb
Auto-merged test/lib/templates/prototype.erb
CONFLICT (rename/modify): Merge conflict in test/lib/templates/prototype.erb
Renamed test/lib/unittest.js => test/lib/assets/unittest.js
Auto-merged test/lib/assets/unittest.js
Auto-merged CHANGELOG
CONFLICT (content): Merge conflict in CHANGELOG
Auto-merged Rakefile
CONFLICT (content): Merge conflict in Rakefile
Auto-merged src/array.js
Auto-merged src/base.js
CONFLICT (content): Merge conflict in src/base.js
Auto-merged src/dom.js
CONFLICT (content): Merge conflict in src/dom.js
Auto-merged src/event.js
CONFLICT (content): Merge conflict in src/event.js
Auto-merged src/form.js
CONFLICT (content): Merge conflict in src/form.js
Auto-merged src/prototype.js
Auto-merged src/selector.js
Auto-merged test/lib/jstest.rb
CONFLICT (content): Merge conflict in test/lib/jstest.rb
Auto-merged test/unit/base_test.js
CONFLICT (content): Merge conflict in test/unit/base_test.js
Auto-merged test/unit/dom_test.js
CONFLICT (content): Merge conflict in test/unit/dom_test.js
Auto-merged test/unit/fixtures/dom.css
CONFLICT (add/add): Merge conflict in test/unit/fixtures/dom.css
Auto-merged test/unit/fixtures/dom.html
CONFLICT (content): Merge conflict in test/unit/fixtures/dom.html
Auto-merged test/unit/fixtures/form.html
Auto-merged test/unit/form_test.js
CONFLICT (content): Merge conflict in test/unit/form_test.js
Auto-merged test/unit/string_test.js
Automatic merge failed; fix conflicts and then commit the result.
(in D:/CVS+SVN+GIT Checkouts/git/prototype)
rake aborted!
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:64: syntax error,
unexpected tLSHFT, expecting kEND
<<<<<<< HEAD:Rakefile
  ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:73: syntax error,
unexpected tEQQ, expecting kEND
===
   ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:80: syntax error,
unexpected tRSHFT, expecting kEND
>>>>>>> 34ee2078f8c61272b69bc9166fd0bf7f94dde5fc:Rakefile
  ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:80: trailing `e' in number
>>>>>>> 34ee2078f8c61272b69bc9166fd0bf7f94dde5fc:Rakefile
  ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:88: syntax error,
unexpected tLSHFT, expecting kEND
<<<<<<< HEAD:Rakefile
  ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:89: syntax error,
unexpected tEQQ, expecting kEND
===
   ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:107: syntax error,
unexpected tRSHFT, expecting kEND
>>>>>>> 34ee2078f8c61272b69bc9166fd0bf7f94dde5fc:Rakefile
  ^
D:/CVS+SVN+GIT Checkouts/git/prototype/rakefile:107: trailing `e' in number
>>>>>>> 34ee2078f8c61272b69bc9166fd0bf7f94dde5fc:Rakefile

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] "Prototype.js (1.6.0.3) breaks Firebug (1.2.1) Options" allegedly.

2008-10-14 Thread Richard Quadling

Hi.

There's been this recent thread in the FireBug Google Group -
http://groups.google.com/group/firebug/browse_thread/thread/095caa522cecbeca?hl=en#

Is there any real issue here?

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: "Prototype.js (1.6.0.3) breaks Firebug (1.2.1) Options" allegedly.

2008-10-15 Thread Richard Quadling

2008/10/15 Andrew Dupont <[EMAIL PROTECTED]>:
>
> Only in the sense that Prototype seems not to be safe to use inside a
> Firefox extension. But even that isn't clear. I posted in the thread
> to try to cut through the hearsay and speculation. Thanks, Richard.
>
> Cheers,
> Andrew
>
Just fighting the good fight!

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Deprecated API documentation

2008-10-26 Thread Richard Quadling

2008/10/26 T.J. Crowder <[EMAIL PROTECTED]>:
>
> Folks,
>
> We've had a suggestion to make the deprecated items in the API docs
> more obviously deprecated (e.g., in lists ):
> http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/291
>
> What do you think of:
>
> 1. Using [deprecated] in the list of classes on the left (as we
> currently do for the list of methods on the right) for classes that
> have been deprecated, e.g., Position.
>
> 2. Using strikeout followed by the [deprecated] marker in the list at
> the top right when you're looking at the methods in a class?
>
> 3. Using strikeout in the list of methods (they already say
> [deprecated]).
>
> Seems like that would be fairly clear.  Strikeout is still fairly
> readable, but it makes the point of something having been removed.
> --
> T.J. Crowder
> tj / crowder software / com
> >
>

-1 for strikeout - simply looks ugly.

+1 for [deprecated]

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Class's Propert's Event

2008-11-06 Thread Richard Quadling

2008/11/4 YargicX <[EMAIL PROTECTED]>:
>
> Hi,
> I wonder that. Will we can attach a user defined event for an object's
> property?
>
>
> >
>

Adding an user event is easy enough, but what will fire the event?

The existing events are fired by the browser in response to various
triggers (user actions, network activity, etc.).

Can you explain a little more what your requirement is?


-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Had a lightbulb moment.

2009-01-14 Thread Richard Quadling

Hi.

I've just reduced a fairly long winded each() loop to ...

var i_LargestLabel = $$(s_CSS).invoke('getWidth').max();


So, this is just a thank you to all you developers.

You all make me look really good!

Thank you.

Richard.
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Prototype CHM issue.

2009-01-15 Thread Richard Quadling

Hi.

I can't easily find an email address for Remi who created the CHM file.

There is a slight issue with 1 link.

In the api/elements/methods.htm file, there is a link ...

or through the Element object

This link works fine online, but not in an html file.

Changing the link to ...

or through the Element object

(adding .htm) and it all works.

Also, I was able to remove the auto hide of the navigation panel
(which I found really annoying).


I can supply the amended CHM file if anyone wants it or if possible,
could you forward this message to Remi.

Thank you.

Richard Quadling.

-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to 
prototype-core-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



  1   2   >