protoype 1.6.0 firefox 2.0.0.9 firebug Hi guys, some questions about prototype, 1) I have construct a Hash instance like this: var h = $H({ version: 1.5, author: ''Sam Stephenson'' }); using each méthode: h.each(function(pair) { alert(pair.key + '' = "'' + pair.value + ''"''); }); but return: version = "1.5" author = "''Sam Stephenson''" extend = "function (object) { return Object.extend.apply(this, [this, object]); }" why return extend ??? 2) construct a Element return an Error with Firebug new Element(''p''); 1 error: String contains an invalid character" code: "5 any idea ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
wind_of_o a écrit :> version = "1.5" > author = "''Sam Stephenson''" > extend = "function (object) { > return Object.extend.apply(this, [this, object]); > }"I don''t have that. So perhaps the page you''re testing on uses other scripts that augment Object.prototype with a extend method. That is widely regarded as a malpractice, at it breaks every for...in loop out there, including the one used internally by Hash#each.> 2) construct a Element return an Error with Firebug > > new Element(''p''); > > 1 error: > String contains an invalid character" code: "5Either you did not type what you thought you typed (perhaps a weird, invisible special char is in there) or you fall victim to other libraries being loaded in your page that don''t play nice with Prototype. I just tried again both your codes on Proto 1.6.0 (Firefox 2.0.0.11, this won''t differ from 2.0.0.9) and they work fine. -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
i''m using the framework rico for round corner 1.1.2 based on protoype 1.1.4 and after comment the script no bugs rised... Strange behavior even if the release used by rico prototype is not the same. On 23 jan, 12:50, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> wind_of_o a écrit : > > > version = "1.5" > > author = "''Sam Stephenson''" > > extend = "function (object) { > > return Object.extend.apply(this, [this, object]); > > }" > > I don''t have that. So perhaps the page you''re testing on uses other > scripts that augment Object.prototype with a extend method. That is > widely regarded as a malpractice, at it breaks every for...in loop out > there, including the one used internally by Hash#each. > > > 2) construct a Element return an Error with Firebug > > > new Element(''p''); > > > 1 error: > > String contains an invalid character" code: "5 > > Either you did not type what you thought you typed (perhaps a weird, > invisible special char is in there) or you fall victim to other > libraries being loaded in your page that don''t play nice with Prototype. > > I just tried again both your codes on Proto 1.6.0 (Firefox 2.0.0.11, > this won''t differ from 2.0.0.9) and they work fine. > > -- > Christophe Porteneuve aka TDD > t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---