[Prototype-core] Re: isNumber or Not A Number ??
Станислав Анисимов a écrit : Shouldn't Object.isNumber('111') be true? Nope. '111' is a String. -- Christophe Porteneuve aka TDD [EMAIL PROTECTED] --~--~-~--~~~---~--~~ 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: isNumber or Not A Number ??
On Sep 4, 5:18 am, Станислав Анисимов [EMAIL PROTECTED] wrote: Is't this a rigth way to define types: 111 is Integer and Number '111' is Number and String 'a111' is String Only `111` is a number primitive. The rest two are plain strings. To find out if a value can be type-converted into a number (as you seem to want to do), you might try something like: function canConvertToNumber(n) { return !isNaN(+n); }; -- kangax --~--~-~--~~~---~--~~ 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: Array.prototype...
Hi Simon, There is a nice explanation in the official prototype documentation about this issue. http://prototypejs.org/api/array I am sure that this will not change in the future, so you should redesign your application if you want to use prototype. Sincerely, Wiktor On Sep 5, 1:44 am, SimonBoris [EMAIL PROTECTED] wrote: Hi prototype team, i am Simon. I have build and application running custom library running on alot of websites. The application failed to work on one website, on IE6 IE7, because they where using prototype. After ready your code, i have found that you where prototyping Array, witch is an native object. In my code, i was doing, for some reasons, a for(var i in array) , and it crashed since it got some methods and not acutal members of the array... When you do a for(var i in array) , no array methods are shown, but when you add them using prototype, it does... You should do a wrapper around your array and not methods using prototype. Waiting for your response and Thanx for your time. Simon --~--~-~--~~~---~--~~ 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.InPlaceEditor onEnterEditMode callback
Anybody know the rationale for putting the triggerCallBack for this so early in the enterEditMode function? (this is in controls.js) I wanted to use a CalendarDateSelect with InPlaceEdit and had to move this trigger line down a ways. Otherwise the form doesn't exist at the time the callback is made, and thus my CalendarDateSelect has nothing to bind to. Jeremy --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---