[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 all?

-Ryan

--~--~-~--~~~---~--~~
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 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 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 "toTemplateElements" or
> teaching Template to try "toObject" after "toTemplateElements" is
> unavailable. What do you guys think?
>
> >
>

--~--~-~--~~~---~--~~
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] 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 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 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 #9692 fixes this:

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

Thanks,
Ryan


--~--~-~--~~~---~--~~
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] Getting patches reviewed and applied

2007-10-13 Thread Ryan McGeary

I've got one prototype patch and one scriptaculous patch awaiting
review from the core team.  I went through the process of getting them
both reviewed and verified under the new Rails process, but I didn't
realize the javascript spinoff teams didn't track Report 12.  It took
a comment from Koz for me to realize this.

What's the best way to receive feedback from the core team?  Does it
make sense for prototype and scriptaculous to follow the same "Report
12" process that Rails is using?

Add optional 'distance' and 'duration' options to Effect.Shake
http://dev.rubyonrails.org/ticket/8637

Add optional context argument to Number#times
http://dev.rubyonrails.org/ticket/9252

Thanks,
Ryan


--~--~-~--~~~---~--~~
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#times is missing a context argument.

2007-08-26 Thread Ryan McGeary

Like the newly updated Enumerable methods, I think Number#times also
deserves a context argument to bind to the iterator.

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

I just wanted to bring some awareness to this ticket before 1.6 final
was released.  Thoughts?

Thanks,
Ryan


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---