[Prototype-core] Re: Improved mass-observer handling

2007-01-27 Thread Mislav Marohnić
On 1/26/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > I think a better scheme *in these cases* would be something like this > when adding observers: > Event.addObserver(key, element, name, observer, useCapture); > and then, the dispose function would simply call something like > Event.stopO

[Prototype-core] Re: Event.stopObserving, does it do proper cleanup?

2007-01-27 Thread Mislav Marohnić
On 1/26/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > I noticed that Event.stopObserving does not actually remove the array > of [element,name,observer] from the observers cache that it adds when > you call Event.observe. Could this be preventing proper garbage > collection? *Could* be pr

[Prototype-core] Re: Event.stopObserving, does it do proper cleanup?

2007-01-27 Thread Mislav Marohnić
On 1/27/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > > > *Could* be preventing GC, ... Errr I meant "could be preventing proper GC before unload", because on unload everything seems properly GC-ed anyway. -m --~--~-~--~~~---~--~~

[Prototype-core] Re: Improved mass-observer handling

2007-01-29 Thread Mislav Marohnić
On 1/29/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > I want to be able to clean up all events for a widget or whatever else > without having to know what elements have observers, or even having to know > what elements have been added or are related to what I'm trying to cleanup. I'm inte

[Prototype-core] Re: SV: [Prototype-core] Re: Improved mass-observer handling

2007-01-29 Thread Mislav Marohnić
On 1/29/07, Tobias Haagen Michaelsen <[EMAIL PROTECTED]> wrote: > > I guess my point is: Keep the normal Event class simple and add extra > functionality in another layer. > Very good point, Tobias. I like what you're suggesting. --~--~-~--~~~---~--~~ You received

[Prototype-core] Re: Upgrading findFirstElement: what do you think?

2007-02-03 Thread Mislav Marohnić
On 2/3/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > I propose a rather simple patch to findFirstElement that would take this > into account: if at least one non-hidden (at the current level of > testing, that is, not accounting for container visibility), enabled > field has a tabindex

[Prototype-core] Re: Enumerable#grep: going beyond string representations

2007-02-03 Thread Mislav Marohnić
On 2/3/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > What we figure is, we could emulate that in Prototype > by assuming whatever gets passed as a first argument has a "match" > method, which is passed the raw element (not its toString representation > anymore) and returns true (or any

[Prototype-core] DOM builder in Prototype core?

2007-02-03 Thread Mislav Marohnić
I just submitted a simple DOM builder enhancement [1]. The framework is currently strong on DOM manipulation, but for content updates it only relies on innerHTML. What I always use in my projects is a simple wrapper around createElement() and appendChild() DOM methods - recently I though it would m

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-04 Thread Mislav Marohnić
On 1/20/07, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > I'd love to hear some feedback. I've been looking at this code for way > too long now, so a fresh pair of eyes may point out something obvious > that I've missed. Also, I'd love it if someone were to modify this > code to add new stuff so

[Prototype-core] Re: DOM builder in Prototype core?

2007-02-05 Thread Mislav Marohnić
Wow, Martin. That is nice :D On 2/5/07, Martin Ström <[EMAIL PROTECTED]> wrote: > > > function Element(tagName, options) { > return Element.extend(document.createElement > (tagName)).writeAttributes(options > || {}); > } > > This way it would be really easy to create new elements when you

[Prototype-core] Re: DOM builder in Prototype core?

2007-02-06 Thread Mislav Marohnić
Andrew: that two features bring us back to Dan's or mine implementations and take out the lightweightness of Martin's elegant solution. Martin: by all means, submit a patch with tests on the already existing ticket: http://dev.rubyonrails.org/ticket/7476#comment:1 Doing so will enable easy review

[Prototype-core] Re: Proposal: Custom Events / Messaging

2007-02-07 Thread Mislav Marohnić
Hello all, See this API documentation (work by Seth Dillingham): http://www.truerwords.net/articles/web-tech/custom_events_ref.html -m --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post

[Prototype-core] Another magical IE bug, breaks Element.extend

2007-02-08 Thread Mislav Marohnić
Two days ago I closed tickets #7497 and #7376. Both sample scripts exhibited the same behavior in IE: after some interaction they fail because Element.Method methods are invoked on an *extended* node, but still are not found. This took me a while to figure out (thanks Joe for Firebug Lite) - suppo

[Prototype-core] Re: Hash constructor

2007-02-08 Thread Mislav Marohnić
On 2/8/07, Alexander Presber <[EMAIL PROTECTED]> wrote: > > > How is the state of affairs in introducing Dean Edwards Base > inheritance to prototype? There are some tickets on inheritance, but > one especially for that? I tried to introduce Base to Prototype once. It was when my level of JavaScr

[Prototype-core] Re: Proposal: Improved Hash

2007-02-08 Thread Mislav Marohnić
On 2/8/07, O Rapouso <[EMAIL PROTECTED]> wrote: > > > Reading the API, i saw that whenever you add a key to a Hash, that has > the same name of a already existing property in its prototype, that > property is lost to the new value, obviously. You can see that happen > in the API's example. Your i

[Prototype-core] Re: More Event Handling Propositions

2007-02-09 Thread Mislav Marohnić
On 2/9/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > I think this patch has become quite refined and mature by now, I'd love to > get some more feedback from the Core guys... > First of all, for all you joining late to the event discussion from several threads back; there's an Event patch

[Prototype-core] Re: Opera 9 support

2007-02-12 Thread Mislav Marohnić
On 2/11/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > Although Opera 9 is *not* officially supported by Prototype, it passes > nearly all tests. > > It would be great to be able to officialy support Opera 9 in upcoming > versions of Prototype. I agree. Opera is a great browser on all fronts a

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

2007-02-14 Thread Mislav Marohnić
On 2/14/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > 1686 var Toggle = new Object(); > 1687 Toggle.display = Element.toggle; > > What is the point of this? It's a shortcut that's supposed to look nice while writing: Toogle.display("foo") I don't like it, though, and also agree t

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

2007-02-14 Thread Mislav Marohnić
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 de

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

2007-02-14 Thread Mislav Marohnić
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 not

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

2007-02-14 Thread Mislav Marohnić
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 notice

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

2007-02-14 Thread Mislav Marohnić
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. --~--~-~--~~~---~--~~ You received this message because you are

[Prototype-core] Re: Proposed rewrite of $$/Selector

2007-02-16 Thread Mislav Marohnić
On 2/16/07, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > I posted the patch in the airport in Tel Aviv right before boarding a > plane... Sounds like a beginning of a great novel! :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Mislav Marohnić
On 2/18/07, Martin Ellis <[EMAIL PROTECTED]> wrote: > > > I fully understand the argument for premature optimisation. But for me > it, its late optimisation, really i needed the performance out of the > box. Optimizing getStyle and setStyle methods would not be premature, but a very welcome optim

[Prototype-core] Re: From rubyonrails-spinoffs: is Element.setStyle a resource hog?

2007-02-18 Thread Mislav Marohnić
On 2/18/07, Martin Ellis <[EMAIL PROTECTED]> wrote: > > > Can't prototype.js be elegant without it looking like ruby code? Prototype.js is not making Ruby in JavaScript. It just embraces the conventions (modules, names, return types) because the two languages have similar dynamic features. As for

[Prototype-core] Re: proposal for new very basic utility function: $default or $d

2007-02-19 Thread Mislav Marohnić
On 2/19/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > I find myself writing code like that the whole time: > > example = example === undefined ? null : example; I don't think the current number of such expressions is enough to justify $d addition. --~--~-~--~~~---

[Prototype-core] Re: proposal for new very basic utility function: $default or $d

2007-02-19 Thread Mislav Marohnić
On 2/19/07, Ken Snyder <[EMAIL PROTECTED]> wrote: > > > function coalesce() { > return $A(arguments).find(function(arg) { > return !(arg===undefined || arg===null); > } > } > > example = coalesce(example, null); I'd stick to the boolean checks and ternary operator, thank you. This is inde

[Prototype-core] Re: proposal for new very basic utility function: $default or $d

2007-02-19 Thread Mislav Marohnić
On 2/19/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > However, when I see the plethora of ways we currently test to see if a > variable is undefined: > > typeof example == 'undefined' > example === undefined I think the middle one is the cheapest (both first are correct). example

[Prototype-core] Re: proposal for new very basic utility function: $default or $d

2007-02-20 Thread Mislav Marohnić
On 2/19/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > I would like to see a isEnumerable, but this can be a problem: what > should we test for? Enumerability, so far, is obtained through "mixing > in" methods. obj.each == Enumerable.each --~--~-~--~~~---

[Prototype-core] Re: Enumerable...

2007-02-20 Thread Mislav Marohnić
On 2/20/07, Dan Webb <[EMAIL PROTECTED]> wrote: > > > I think it's really important to do something about this because as it > stands Prototype overwrites JS 1.6 methods with incompatible versions. As > more browser support these methods and more scripts depend on them its going > to be a problem.

[Prototype-core] Re: proposal for new very basic utility function: $default or $d

2007-02-20 Thread Mislav Marohnić
On 2/20/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > > obj.each == Enumerable.each > > Hmmm, yeah, but is that really enough? Yup. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" grou

[Prototype-core] new Event functionality

2007-02-21 Thread Mislav Marohnić
I've just commited [6194], the event branch. It holds improvements for IE as well as simple observer removal. This is a rewrite of half of the old Event module, so check it out (functional tests inside). But it doesn't stop there. Ken Snyder and Colin Mollenhour have been collaborating on #7435 th

[Prototype-core] Re: new Event functionality

2007-02-22 Thread Mislav Marohnić
On 2/22/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > Would you submit a full patch over the latest trunk (and verify all > existing tests still pass once you're done)? Well, he just submitted full code (no need for patch) and it's unlikely that it would break anythink since all it d

[Prototype-core] Re: Documentation.

2007-02-22 Thread Mislav Marohnić
On 2/22/07, Richard Quadling <[EMAIL PROTECTED]> wrote: > > > 1 - If I need permission to produce a derivative of the documentation, > who do I apply to for this? You don't need permission, just fire away - most of us core guys agreed on the Creative Commons BY-SA license, although we haven't rea

[Prototype-core] Re: new Event functionality

2007-02-22 Thread Mislav Marohnić
On 2/21/07, Tom Gregory <[EMAIL PROTECTED]> wrote: > > > 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.tar

[Prototype-core] Re: Translating documentation?

2007-02-22 Thread Mislav Marohnić
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

[Prototype-core] Re: Ajax.Request Breaks on Firefox 2.0.0.1

2007-02-23 Thread Mislav Marohnić
On 2/23/07, RFLudwick <[EMAIL PROTECTED]> wrote: > > > Any ideas? You included the new JSON library from json.org? That is what broke Prototype. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" grou

[Prototype-core] Re: new Event functionality

2007-02-27 Thread Mislav Marohnić
On 2/27/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > Mislav's and Andrew's patch has the same characteristics as the > original Event class in that the global caching is still done > internally (although only for IE). Not only for IE anymore - how else could we remove all handlers from a

[Prototype-core] Re: new Event functionality

2007-02-27 Thread Mislav Marohnić
On 2/28/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > The gist of my patch is this: Nice summary. Lastly, why don't I add this functionality separately instead of > trying to get Prototype patched? It is because the Event class does > it's own caching in such a way that cannot be extend

[Prototype-core] Re: Which is "better"?

2007-03-02 Thread Mislav Marohnić
On 3/2/07, Richard Quadling <[EMAIL PROTECTED]> wrote: > > > 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. With Prototype, you should have used Insertion (see the docs). Which is "be

[Prototype-core] Hash.toQueryString changes

2007-03-02 Thread Mislav Marohnić
I'm combining Tobie's and mine Hash patches to see how they work out. These changes fix 3 bugs and remove some premature optimization from toQueryString method. Now, ticket #7494 by Skirch is about nested hash support - I like it and am thinking about rolling it in for the next release. There are a

[Prototype-core] Re: Hash.toQueryString changes

2007-03-03 Thread Mislav Marohnić
On 3/3/07, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > #4 looks fine to me. > > On #1 and #2: perhaps the answer is... > > { foo: undefined } => "foo=" > { foo: null } => "" Interesting. My opinions are: 1. undefined should be skipped, but null should become an empty value (empty string

[Prototype-core] Re: Bug in Position.cumulativeOffset

2007-03-04 Thread Mislav Marohnić
On 3/4/07, Thomas Fuchs <[EMAIL PROTECTED]> wrote: > > > Next time, please see: > http://prototypejs.org/contribute Psst! He can't be bothered :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" gro

[Prototype-core] Re: Download compressed Prototype: protopressed_v2.zip (14.4kb gzipped, 19.6kb pressed)

2007-03-09 Thread Mislav Marohnić
On 3/9/07, jd <[EMAIL PROTECTED]> wrote: > > > A framework is only as strong as the users and dev team around it. > Prototypes "community" presence is probably the weakest out of all the > popular JavaScript frameworks (Prototype's blog hasn't been updated > since Feb 1st). With a lot of devs leavi

[Prototype-core] Re: Download compressed Prototype: protopressed_v2.zip (14.4kb gzipped, 19.6kb pressed)

2007-03-10 Thread Mislav Marohnić
On 3/10/07, Тома <[EMAIL PROTECTED]> wrote: > > > Is anybody having trouble downloading this? When I click on the > download link, I am taken back to this message. Both download links in the article are correct and point to the static file. Please comment on the article if you find some links bro

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

2007-03-10 Thread Mislav Marohnić
On 3/10/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote: > > > In case you like / need it. I have updated my CHM version of the API > docs and uploaded it to my webspace. It looks very nice. We appreciate your effort! The file is handcrafted ... Really? You did this all completely by hand? Surely

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

2007-03-10 Thread Mislav Marohnić
On 3/10/07, Kjell Bublitz <[EMAIL PROTECTED]> wrote: > > > Enjoy the file, > http://www.m3nt0r.de/devel/Prototype.chm I have linked it: http://prototypejs.org/api So now please let us know if the URL changes ;) --~--~-~--~~~---~--~~ You received this message beca

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

2007-03-10 Thread Mislav Marohnić
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

[Prototype-core] Re: Download compressed Prototype: protopressed_v2.zip (14.4kb gzipped, 19.6kb pressed)

2007-03-12 Thread Mislav Marohnić
On 3/12/07, kourge <[EMAIL PROTECTED]> wrote: > > > Another interesting note: > You can also remove whitespace from code and make it compressor- > friendly easily by wrapping it around with an anonymous function in > Firefox, then call the function's toSource() method. An interesting cleanup meth

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

2007-03-12 Thread Mislav Marohnić
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

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

2007-03-13 Thread Mislav Marohnić
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

[Prototype-core] Re: suggested documentation update for $$()

2007-03-13 Thread Mislav Marohnić
On 3/13/07, AJ <[EMAIL PROTECTED]> wrote: > > > So the following will return nothing > var elems = $$("label[for='someId']"); In 1.5.1 it doesn't matter anymore, single or double quotes. That kinda breaks W3C specs, but hey - rules are meant to be broken :) But if the above query fails in 1

[Prototype-core] Re: Hash.toQueryString changes

2007-03-13 Thread Mislav Marohnić
27;, 'c'] }. Rails (PHP too, I think) would preserve only the first value. Ruby preserves all. 3. "foo[]=a&foo[]=b&foo[]=c" becomes { 'foo[]':['a', 'b', 'c'] }. Rails and PHP would now preserve all values, but remove the squa

[Prototype-core] Re: Hash.toQueryString changes

2007-03-13 Thread Mislav Marohnić
On 3/13/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > > 4. "foo=a=b=c" becomes { foo:'a=b=c' } > Totally (is this even a valid URL component though?). Backends choose how they parse query strings. This is how Rails parses it, and here it preserves original data when serialized back t

[Prototype-core] Re: suggested documentation update for $$()

2007-03-13 Thread Mislav Marohnić
On 3/13/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > Marius Feraru a écrit : > > Could you please explain why do you think this breaks W3C specs, as I > cannot > > see it, neither at level 3 [1], nor at level 2 [2]? TIA. > > Indeed, this doesn't break the specs. Oops. Again I mixed

[Prototype-core] Re: DOM builder in Prototype core?

2007-03-14 Thread Mislav Marohnić
On 3/14/07, Martin Ström <[EMAIL PROTECTED]> wrote: > > > What do you think? Seems nice to me. Not everything has to be strict :) The only problem now remains IE and its read-only attributes like "name" ... If only it weren't for that :( --~--~-~--~~~---~--~~ You

[Prototype-core] Re: DOM builder in Prototype core?

2007-03-15 Thread Mislav Marohnić
On 3/15/07, Martin Ström <[EMAIL PROTECTED]> wrote: > > FYI: tests and code are now submitted to trac: > http://dev.rubyonrails.org/ticket/7476#comment:2 Nice! This is a very solid foundation for a more featured Builder (IMO). But, I would rename writeAttributes to setAttributes for consistency

[Prototype-core] Re: DOM builder in Prototype core?

2007-03-15 Thread Mislav Marohnić
On 3/15/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > I'd favor writeAttribute to be consistant with readAttribute... and > setStyle (which is not pluralized). Good point. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Prototype-core] Re: DOM builder in Prototype core?

2007-03-15 Thread Mislav Marohnić
On 3/15/07, Andrew Dupont <[EMAIL PROTECTED]> wrote: > > > The issue here is that each attribute is a separate unit, whereas you > could argue that each of the properties you pass to setStyle is just > part of the overall "style" of the element. Hmm, also a very good point. (damn, I'm so easily

[Prototype-core] Re: Hash.toQueryString changes

2007-03-15 Thread Mislav Marohnić
On 3/15/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > Code: http://pastie.caboo.se/47059 > > I'd appreciate your opinions Here's mine. First, it uses $H(value).findAll, so it isn't safe (try feeding it "each", for instance). Second, about arrays: Hash._toQueryString(key+'['+index+']',v

[Prototype-core] Re: Hash.toQueryString changes

2007-03-15 Thread Mislav Marohnić
On 3/16/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > > Here's mine. First, it uses $H(value).findAll, so it isn't safe (try > feeding > > it "each", for instance). > > The new function in 1.5.1_rc1 has the same problem so I figured you > were comfortable with that fact already.. No I'm n

[Prototype-core] Re: Using delegate pattern vs extends in Array

2007-03-16 Thread Mislav Marohnić
On 3/15/07, t.chemit <[EMAIL PROTECTED]> wrote: > > > Just one thing, it is seriously plainfull to integrate your framework > on a existing large application which uses the for ( var val in array > ) structure. Using that "structure" is treating arrays as hashes, which they are not. Besides, yo

[Prototype-core] Re: Hash.toQueryString changes

2007-03-16 Thread Mislav Marohnić
On 3/16/07, Michael Peters <[EMAIL PROTECTED]> wrote: > > > I also think this method is becoming way more complicated than it needs to > be. > This is not a generic data serialization method. We don't need to deal > with > nested hashes or arrays inside arrays. Wisely said. I believe Sam thinks s

[Prototype-core] Re: Download 1.5.1_rc2

2007-03-16 Thread Mislav Marohnić
Thanks. No reason - we simply forgot to update the page ;) On 3/16/07, seb <[EMAIL PROTECTED]> wrote: > > > Hi > > I have just noticed that on the website, in the download area, it's > still 1.5.1_rc1 and not 1.5.1_rc2. > Just for information (or may be there ia reason that I don't see) > Seb > >

[Prototype-core] Re: toQueryParams() vs toQueryString()

2007-03-18 Thread Mislav Marohnić
On 3/16/07, Michael Peters <[EMAIL PROTECTED]> wrote: > > > So the problem is that String.toQueryParams() is changing an empty element > into > undefined instead of either null or "". Right? If so should I open a > ticket and > attach a patch? I'm aware of the issue, so you don't need to... but t

[Prototype-core] Re: Hash.toQueryString changes

2007-03-18 Thread Mislav Marohnić
On 3/16/07, Tom Gregory <[EMAIL PROTECTED]> wrote: > > > This problem didn't exist (at this volume level) until Prototype started > serializing Forms as Hashes instead of query strings What problem? I thought we were merely discussing about conventions and which to embrace/discard. ... which led

[Prototype-core] Re: Dox Typo

2007-03-20 Thread Mislav Marohnić
On 3/20/07, Richard Quadling <[EMAIL PROTECTED]> wrote: > > > http://prototypejs.org/api/prototype Thanks - fixed. 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 everythin

[Prototype-core] Re: Node Insertion Methods

2007-03-20 Thread Mislav Marohnić
On 3/20/07, Ken Snyder <[EMAIL PROTECTED]> wrote: > > > insertAfter (complement of insertBefore) > prependChild (complement of appendChild) > addNodeBefore > addNodeAfter I like these. I used similar ones for some time now as a part of an add-on script. I think these should be a part of the Inser

[Prototype-core] Re: Ajax.Request with method different from GET or POST

2007-03-20 Thread Mislav Marohnić
On 3/20/07, Thomas Broyer <[EMAIL PROTECTED]> wrote: > > > Couldn't it be possible to have a "rewriteMethod" flag (eventually > defaulting to "true" for backward compatibility) to turn "method > rewriting to POST" off? Yeah, there's a ticket in the issue tracker for that. I think we should defini

[Prototype-core] Re: Node Insertion Methods

2007-03-20 Thread Mislav Marohnić
On 3/20/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > I'd be in favor or having element methods which deal with both. +1 Four methods at most should do the trick. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Prototype-core] Re: Node Insertion Methods

2007-03-20 Thread Mislav Marohnić
On 3/20/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > I suggest only using those methods if you need guarantees that you are > getting a DOM element and not a text node. In this case I would argue > that you *do* want text nodes. I second that. The methods we're discussing here should ope

[Prototype-core] Re: Dean Edwards new library

2007-03-21 Thread Mislav Marohnić
On 3/21/07, Meritt d`Elnir <[EMAIL PROTECTED]> wrote: > > > ... in which he is > implemented the fastest Selectors API. Benchmark > http://homepages.nildram.co.uk/~9jack9/base2/speedtest/ Danger. The page loads 2.5 MB of scripts and dojo.js makes tens of XHR (synchronous!) requests which all resu

[Prototype-core] Re: Ajax.Updater and Cacheability

2007-03-23 Thread Mislav Marohnić
On 3/23/07, Walter <[EMAIL PROTECTED]> wrote: > > > Ajax.SingleUpdater - Fetches the URL once, then returns the same > content on > subsequent calls with the same URL. We already have that. Make a single Ajax.Request, then re-use the content. Ajax.CacheableUpdater - Respects standard HTTP 'Expir

[Prototype-core] Re: Issues on IE

2007-03-24 Thread Mislav Marohnić
On 3/24/07, Srini <[EMAIL PROTECTED]> wrote: > > > Our application works fine in mozilla , but not on IE. You're sending HTML as XML over Ajax. That's fine, but it means you have to use XHTML with "application/xhtml+xml" in order for reponseXML to work ("text/html" won't do it). The thing is, IE

[Prototype-core] Re: Form.serialize, Ajax.Request, Hash.toQueryString, "".toQueryParams

2007-03-26 Thread Mislav Marohnić
On 3/26/07, Tobie Langel <[EMAIL PROTECTED]> wrote: > > > > my inclination is to stick to a very spec-compliant and unambitious Hash > serializer for 1.5.1. > > + 1 +1 It's done, anyway. Final patch to deal with current issues coming up tomorrow. --~--~-~--~~~---~--~

[Prototype-core] Re: Form.serialize, Ajax.Request, Hash.toQueryString, "".toQueryParams

2007-03-28 Thread Mislav Marohnić
Collin (and others) - Please check out the latest trunk. Yesterday's update fixes the final minor issues: http://dev.rubyonrails.org/changeset/6481 See the unit tests for Hash#toQueryString and String#toQueryParams. Let me know if there's something missing. We're not supporting nested hashes and

[Prototype-core] Re: New Idea for Prototype Compilation

2007-03-28 Thread Mislav Marohnić
On 3/28/07, Eric Harrison <[EMAIL PROTECTED]> wrote: > > Unfortunately, the problem here > is that Prototype.js gets all of its power and smallish size by using > it's own functions extensively throughout the code. Eric gave a very good answer. Modules in Prototype framework can hardly be decoupl

[Prototype-core] Re: Image File Serialize

2007-03-28 Thread Mislav Marohnić
On 3/28/07, Stefan Liebenberg <[EMAIL PROTECTED]> wrote: > > > Does anybody know how to send a serialized upload file value thing to > your server I tried and i suck. You can't do it with JavaScript. But if you still want to make a groovy asynchronous file upload then you can make a hidden IF

[Prototype-core] Re: Ajax.* & scandinavian characters

2007-03-29 Thread Mislav Marohnić
On 3/29/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > For POST, you can indeed use Latin1, so long as you: > >(a) do set the encoding option so your server side isn't confused >(b) do not rely on Hash.toQueryString, which will use >encodeURLComponent, which by necessity

[Prototype-core] Re: Image File Serialize

2007-03-29 Thread Mislav Marohnić
On 3/29/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote: > > > See this for a start. It is nowhere near Prototype Core quality but it > works. > http://pastie.caboo.se/50410 It's not a bad start. We should have an internal discussion about whether we will use current SVN to store and maintain such

[Prototype-core] Re: adding $parent to Object.extend

2007-03-29 Thread Mislav Marohnić
On 3/30/07, Lorderon <[EMAIL PROTECTED]> wrote: > > > Many times there's a need to call the parent method from the extended > class object. > This can be done easily by adding the $parent to be used inside > Object.extend() method. You're touching sensitive ground here. There are many OOP impleme

[Prototype-core] Re: prototype 1.50_1.51 has a bug on Ajax.Rquest

2007-04-04 Thread Mislav Marohnić
I know every programmer should learn a new language at least once in a while, but this is ridiculous On 4/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > 在用ajax.request发送异步请求并处理返回(最普通的处理)时,用1.40在ie6.0 无sp1更新和ie6.0 有sp1更新的环境下运 > 行,都是正常的,而用最新的1.50和1.51在前一种环境下请求发出但是会返 > 回"ERROR_WINHTTP_HEADER

[Prototype-core] Re: prototype 1.50_1.51 has a bug on Ajax.Rquest

2007-04-04 Thread Mislav Marohnić
On 4/4/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > You don't speak question mark? Come on, man. No, it was Chinese. I guess your email client isn't set up well (or you have some missing locales on your computer) --~--~-~--~~~---~--~~ You received this message bec

[Prototype-core] Re: prototype 1.50_1.51 has a bug on Ajax.Rquest

2007-04-04 Thread Mislav Marohnić
On 4/4/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > lol, either way. Question mark... Chinese... might as well be Greek :-) It would be a huge difference. If I know Andrew well enough, he might be able to translate Greek! (Or was it ancient Greek?) --~--~-~--~~~---~-

[Prototype-core] Re: periodicalUpdater doc in Safari

2007-04-08 Thread Mislav Marohnić
Try it now. There was some ill-formed HTML On 4/8/07, seb <[EMAIL PROTECTED]> wrote: > > > I just noticed on this sunny sunday that periodicalUpdater doc (what > the hell I am doinf in front my computer :)) (http://prototypejs.org/ > api/ajax/periodicalUpdater) has an issue on Safari. > Safari (ev

[Prototype-core] Re: Documentation errors...

2007-04-13 Thread Mislav Marohnić
On 4/13/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > > Also your entry on > > http://www.prototypejs.org/api/template/evaluate > > > > is moved to the far bottom of the page for some reason. > > Just like on any other page: if there is introduction material for an > object, its detail

[Prototype-core] Re: 1.5.1 status?

2007-04-18 Thread Mislav Marohnić
On 4/18/07, Martin Ström <[EMAIL PROTECTED]> wrote: > > > I'm starting a > new project and want to use the new Selector and everything (and it's > working great for me) but since the final version hasn't been released > yet there must be some bugs I don't really knwow about. Hello Martin, We've

[Prototype-core] Re: Event.observe and .stopObserving

2007-04-18 Thread Mislav Marohnić
On 4/19/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > > It's not broke, does not need fixing. Not at the core level. If you want > further abstraction, wrap it. Wrappers are your friend. And in Prototype 1.6 you'll be able to write Event.stopObserving(someElement, 'click') Support for this i

[Prototype-core] Re: Form not available as singleton.

2007-04-19 Thread Mislav Marohnić
On 4/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > This does not work! > You got it all wrong. It should be Form.reset('h') because "Form" is not a function, it is a namespace. It holds methods that can be invoked ass class methods, resembling a singleton pattern. --~--~

[Prototype-core] Re: Event.observe and .stopObserving

2007-04-19 Thread Mislav Marohnić
On 4/19/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > Mislav... there will still be the ability to remove only a single listener > right? No! We turned evil and decided to break every app out there! :)) Of course backwards compatibility is there. You will need the reference to the handler (as alw

[Prototype-core] Re: Event.observe and .stopObserving

2007-04-20 Thread Mislav Marohnić
On 4/20/07, Andrew Sumin <[EMAIL PROTECTED]> wrote: > > > So now I can do this > > var observer = Event.observe( ... ); > observer.stop(); > observer.start(); I did something similar in the Event branch. It's meant to be private, though --~--~-~--~~~---~--~~ You r

[Prototype-core] Re: waht aboput an "ready" function?

2007-04-23 Thread Mislav Marohnić
On 4/23/07, Martin Ström <[EMAIL PROTECTED]> wrote: > > > There's patch for this functionality on Trac: > http://dev.rubyonrails.org/ticket/5414 > > but I don't know what the status is before committing it into core. The consensus in core team is to have it (if I'm not mistaken). I think there's

[Prototype-core] Re: Ideas for resolving old Browser Helper Object problem?

2007-04-23 Thread Mislav Marohnić
On 4/23/07, Fabian Lange <[EMAIL PROTECTED]> wrote: > > > Snobe Johan I found the line causing the crash in prototype :-) > I will make a blog post about it, but it is this line: > var Event = new Object(); We check if "Event" is already defined in the global namespace, so therefore we've taken s

[Prototype-core] Re: Ideas for resolving old Browser Helper Object problem?

2007-04-23 Thread Mislav Marohnić
On 4/23/07, Fabian Lange <[EMAIL PROTECTED]> wrote: > > > So perhaps really no chances for a solution on prototype side? Maybe, if you can think of a solution that doesn't rename Event. You are more competent to do so because my understanding of the problem is not comparable to yours. I see it h

[Prototype-core] Re: what about an "ready" function?

2007-04-23 Thread Mislav Marohnić
On 4/23/07, Christoph Roeder <[EMAIL PROTECTED]> wrote: > > > PS: how can I change the subject to >>what about an "ready" function? > << ? You just did. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Co

[Prototype-core] Re: bug in toQueryParam methods....

2007-04-25 Thread Mislav Marohnić
On 4/25/07, Michael Peters <[EMAIL PROTECTED]> wrote: > > > This has been fixed in 1.5.1rc3. Yeah, I've spent days to ensure there's no more breakage in query-related stuff. Jdalton, please try RC3 and report back if you still think there are bugs. --~--~-~--~~~---~--

[Prototype-core] Re: Opera 8.54

2007-04-26 Thread Mislav Marohnić
On 4/26/07, Andrew Sumin <[EMAIL PROTECTED]> wrote: > > > I add prototype 1.5.1_rc3 to the page. All submits in Opera do > nothing. Interesting. We don't plan to support Opera below version 9, but will still take a look at this fix. __proto__ is proprietary, so we can't expect to behave the same

[Prototype-core] Re: Why isn't TimedObserver a subclass of PeriodicUpdater?

2007-04-27 Thread Mislav Marohnić
On 4/27/07, Andrew McClain <[EMAIL PROTECTED]> wrote: > > > Is there a compelling reason not to do this? Don't think so. We may undertake refactoring of class-based stuff in Prototype core. If that happens, duplication will be eliminated. With the particular stuff you are referring to it may hap

[Prototype-core] Re: Opera 8.54

2007-04-27 Thread Mislav Marohnić
On 4/27/07, Andrew Sumin <[EMAIL PROTECTED]> wrote: > > > I agree don't support opera 8.54 but break native posts is too much Right. If you're right, I wonder why it hasn't been reported before ... --~--~-~--~~~---~--~~ You received this message because you are su

[Prototype-core] Re: Bug! Function.bindAsEventListener() appends Event object twice to arguments...

2007-04-27 Thread Mislav Marohnić
On 4/27/07, jdalton <[EMAIL PROTECTED]> wrote: > > > Well. It turns out now that the event object is the first and second > param http://dev.rubyonrails.org/ticket/6497 Searching is super! --~--~-~--~~~---~--~~ You received this message because you are subscribed

  1   2   3   4   >