[Proto-Scripty] Re: Object.extend equivelant

2009-11-09 Thread kstubs
It is defined like this: var GridBuild = function(){}; Object.extend(Object.extend(GridBuild.prototype, GridBase.prototype), ... code cut here ... { On Nov 9, 7:30 am, "T.J. Crowder" wrote: > Hi, > > > I get an error in prototypejs, "parent.subclasses is undef

[Proto-Scripty] Re: Object.extend equivelant

2009-11-09 Thread T.J. Crowder
Hi, > I get an error in prototypejs, "parent.subclasses is undefied" (occurs > at line 99) the code is: > > parent.subclasses.push(klass); > > Any ideas? The superclass (parent) must be a class that was defined with Class.create; from that error, I'm thinking GridBuild is defined "raw" (or in so

[Proto-Scripty] Re: Object.extend equivelant

2009-11-08 Thread kstubs
UPDATE! This works: var GymnastFind = Class.create(GridBuild.prototype, Ajax.Application.Base.prototype, UserState, { HEAD: ['MSOID', 'USAG', 'Description', 'DOB'], initialize: function(container, url) { this.url = url; this.container

[Proto-Scripty] Re: Object.extend equivelant

2009-11-08 Thread kstubs
If I do something like this: var GymnastFind = Class.create(GridBuild, Ajax.Application.Base.Prototype, UserState, { HEAD: ['MSOID', 'USAG', 'Description', 'DOB'], initialize: function(container, url) { this.url = url; this.container = $(container).select('div.grid_contain

[Proto-Scripty] Re: Object.extend equivelant

2009-11-08 Thread T.J. Crowder
Hi Karl, Class.create accepts a base class and multiple mix-ins[1]. The way JavaScript's instanceof operator works, you can't create a new class from two disparate base classes and have the new class be an "instanceof" both of the base classes, you have to choose one as a base and mix-in the othe