[Prototype-core] Re: problems with functions in Class

2008-06-08 Thread aljvilla
Hello kangax thank you for your input I am using the version scriptaculous-js-1.8.1 I probe with your example and continues to give me the same mistake On 7 jun, 22:12, kangax <[EMAIL PROTECTED]> wrote: > Are you using 1.6+ ? > The correct syntax for defining a "class" has changed since 1.5: > >

[Prototype-core] Re: problems with functions in Class

2008-06-08 Thread T.J. Crowder
Hi, Check it carefully for typos. For instance, your original had > ReadHash.prototyte = { Where you probably meant > ReadHash.prototype = { Of course, this will have changed anyway if you're updating things in line with Kangax's help; I'm just saying, if it's not working, perhaps there'

[Prototype-core] Re: problems with functions in Class

2008-06-08 Thread Mislav Marohnić
On Sun, Jun 8, 2008 at 9:43 AM, aljvilla <[EMAIL PROTECTED]> wrote: > > Hello kangax thank you for your input > I am using the version scriptaculous-js-1.8.1 > I probe with your example and continues to give me the same mistake Hi aljvilla, Kangax didn't ask you for the version of script.aculo.

[Prototype-core] Re: C and PHP style syntax to fill an array with values

2008-06-08 Thread tancurrom
It's interesting to note that in JavaScript version 1.7, array comprehensions allows you do achieve this kind of 'filling' of your arrays. E.g. function range(begin, end) { for (let i = begin; i < end; ++i) { yield i; } }; var n = [0 for each (i in range(0,20))] // [0,0,0,0,0,0,0,0,0,0,

[Prototype-core] Status of property 'name' within Class.create(d) functions

2008-06-08 Thread Franck PORCHER
Hello, I have been trying for days o understand what I have missed. I have narrowed down the problem to this, where I create a simple class 'foo' that I extend to assign a private member 'name' set to 'FOO': var foo = Class.create({}); Object.extend( foo, { name : 'FOO' } ); Then :

[Prototype-core] Re: Status of property 'name' within Class.create(d) functions

2008-06-08 Thread Jeff Watkins
Off the top of my head, I'd guess you're using FireFox. I know the JS engine in FireFox (SpiderMonkey) exposes the name of a function via the `name` property, however, I don't know whether that property is mutable. My guess, from the behaviour of your code, is `name` is not a mutable prope

[Prototype-core] Re: Status of property 'name' within Class.create(d) functions

2008-06-08 Thread Franck PORCHER
Yes Jeff, I'm using Firefox (Linux & FreeBSD plat-forms). And peering at the source code, one can see that Class.create() defines an explicit klass() function, hence the 'klass' display. Apparently, this property in not mutable. Something of a pain :-[ I will be reviewing prtotype's Class.creat

[Prototype-core] Re: Status of property 'name' within Class.create(d) functions

2008-06-08 Thread kangax
Yep, it's suppose to be read-only http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Function:name On Jun 9, 12:31 am, Jeff Watkins <[EMAIL PROTECTED]> wrote: > Off the top of my head, I'd guess you're using FireFox. I know the JS   > engine in FireFox (SpiderMonkey