[Prototype-core] Re: combinator selectors in Element#select

2007-10-17 Thread Andrew Dupont
I'm not crazy about it. Deviations from the CSS3 spec are troublesome because they're not discoverable and they violate POLS. If we're going to go down that slippery slope, selector.js will get even larger than it already has. The extended Enumerable#grep semantics in 1.6 make kangax's alternativ

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

2007-10-17 Thread Mislav Marohnić
On 10/17/07, Bart Lewis <[EMAIL PROTECTED]> wrote: > > > Looks like isLeftClick was significantly changed just yesterday: > http://dev.rubyonrails.org/changeset/7926 ... and it was fixed today: http://dev.rubyonrails.org/changeset/7954 Thanks for reporting, though. Everyone who has troubles with

[Prototype-core] isLeftClick Bug in Proto 1.6.0 RC1

2007-10-17 Thread Bart Lewis
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 d

[Prototype-core] Re: combinator selectors in Element#select

2007-10-17 Thread Mislav Marohnić
On 10/17/07, kangax <[EMAIL PROTECTED]> wrote: > > > In a nutshell, element.select(' > foo') does not return the correct > result +1 for fixing it, regardless of the fact it may not be a valid selector ... it's a valid fragment of a selector. I want to be able to select immediate descendants thi

[Prototype-core] setOpacity error

2007-10-17 Thread Trevan Richins
I just discovered that if you call setOpacity in IE on an element that was just created (and so hasn't been added to the DOM yet), an exception will be thrown. It looks like the currentStyle object on the element is not set until after it has been attached to the DOM. An example script is: h

[Prototype-core] Re: combinator selectors in Element#select

2007-10-17 Thread [EMAIL PROTECTED]
Please make it to be simple, look at the source code: select: function() { var args = $A(arguments), element = $(args.shift()); return Selector.findChildElements(element, args); }, the "select" method is only a wrapper of the Selector.findChildElements, and with different selector cont

[Prototype-core] Re: $$ function needs context attribute?

2007-10-17 Thread [EMAIL PROTECTED]
Oh, the "select" method, I haven't use it, and the context is important for the css selector, and in the case Selector.findChildElements supports the context, So only change the $ $ function and to check whether the last argument is HTML element or not is enough. And context is really very import

[Prototype-core] combinator selectors in Element#select

2007-10-17 Thread kangax
I recently stumbled upon http://dev.rubyonrails.org/ticket/ 9465">this ticket In a nutshell, element.select(' > foo') does not return the correct result while element.select('foo') does. I understand that combinator selector should be defined between two simple ones (so it's not quite a valid ex

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Mislav Marohnić
We can stop arguing now. Sam has already fixed it in trunk: http://dev.rubyonrails.org/changeset/7955 :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to p

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Ryan McGeary
> ... people who want to use an actual Hash as a > source object to a template should pass myHash.toObject() instead of > just myHash... I tend to disagree. I think requiring myHash.toObject() violates the POLS. Otherwise, why does Template#evaluate even try calling toTemplateReplacements at a

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Mislav Marohnić
On 10/17/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote: > > > This being said, I don't think there's a massive reason to add this > orthogonal feature to Hash: people who want to use an actual Hash as a > source object to a template should pass myHash.toObject() instead of > just myHash...

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Christophe Porteneuve
Mislav Marohnić a écrit : > I'm torn between teaching Hash to respond to "toTemplateElements" or > teaching Template to try "toObject" after "toTemplateElements" is > unavailable. What do you guys think? The second version seems totally overreaching. If we do that AT ALL, I'd favor: Hash.pro

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Ryan McGeary
+1 for teaching Hash to respond to "toTemplateReplacements," because I find this to be more self-documenting. On 10/17/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote: > > On 10/17/07, G Jones <[EMAIL PROTECTED]> wrote: > > > > > > Looking at the code for Template, it looks like it might be as simp

[Prototype-core] Re: Prototype Pagination

2007-10-17 Thread Mislav Marohnić
On 10/15/07, Matt Foster <[EMAIL PROTECTED]> wrote: > > > I have developed a pretty smooth UI Control for handling > client side pagination. It is composed of 3 classes that allow for > maximum decoupling. In this manner the view is decoupled from the > iteration control, such that the same itera

[Prototype-core] Re: Hash no longer works with templates/interpolate()

2007-10-17 Thread Mislav Marohnić
On 10/17/07, G Jones <[EMAIL PROTECTED]> wrote: > > > Looking at the code for Template, it looks like it might be as simple > as giving Hash a 'toTemplateElements()' method that returns > 'this.toObject()' http://dev.rubyonrails.org/ticket/9903 I'm torn between teaching Hash to respond to "toTem

[Prototype-core] Hash no longer works with templates/interpolate()

2007-10-17 Thread G Jones
It may never have been intended to use this way, but I've found it quite useful in the past to be able to use hashes as the source for template variables. With the new restriction on accessing properties directly this no longer works. Looking at the code for Template, it looks like it might be as

[Prototype-core] Re: svn:ignore

2007-10-17 Thread Mislav Marohnić
+1 for ignoring "pkg" and "dist/*", but keep the dist directory itself. On 10/17/07, Ryan McGeary <[EMAIL PROTECTED]> wrote: > > > What does the core team thinnk about svn:ignoring "pkg" and "dist/ > prototype.js?" Clean svn status messages make me happy :-) > > Ticket #9705 elaborates: > http:/

[Prototype-core] svn:ignore

2007-10-17 Thread Ryan McGeary
What does the core team thinnk about svn:ignoring "pkg" and "dist/ prototype.js?" Clean svn status messages make me happy :-) Ticket #9705 elaborates: http://dev.rubyonrails.org/ticket/9705 Thanks, Ryan --~--~-~--~~~---~--~~ You received this message because yo

[Prototype-core] Unexpected behavior while evaluating a template with an empty replacement

2007-10-17 Thread Ryan McGeary
Currently, a template with an empty replacement variable gobbles up the preceding character: "##{}".interpolate({}) // => "" "AB#{}".interpolate({}) // => "A" Instead, I think the template should evaluate just like it does in Ruby: "##{}" #=> "#" "AB#{}" #=> "AB" A patch in Ticket #9

[Prototype-core] Re: $$ function needs context attribute?

2007-10-17 Thread Mislav Marohnić
On 10/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I think is is good to create a new function > called "$$$" or something like that to make a short selector function > and supports context. We use "Element#select" to constrain the lookup to a certain element: $("foo").select("img

[Prototype-core] $$ function needs context attribute?

2007-10-17 Thread [EMAIL PROTECTED]
In the jQuery the $ function have two attributes the second is context, and it is very useful, for example: $("div").each(function(){ $("img",this).hide() $(".",this).dosomething() }) And in the Prototype there is also Selector.findChildElements and the first attribute is the context, and this