[Prototype-core] Two Parter: Suggestion for Arrays; Question about Object.extend

2007-05-12 Thread Kickboy
ke this function a prototype of Object. Currently you use it like this: Object.extend(someobj, { ... }); I would think it would be better to format it like this: somobj.extend({ ... }); Simply curious why one way was chosen over the other. I don't really have a preference, I'd d

[Prototype-core] Re: Two Parter: Suggestion for Arrays; Question about Object.extend

2007-05-13 Thread Kickboy
> Actually that was exactly what Prototype did when it was young - augment > Object.prototype. It was removed when Sam was convinced by Dean Edwards that > it was really a bad thing. No JS library should ever touch Object.prototype; > search on the web why (if you're interested). > > Now these met

[Prototype-core] setStyle() throwing errors in IE when object does not exist in DOM

2007-05-17 Thread Kickboy
I'm trying to set the style of elements that are created through document.createElement() using the setStyle() function. Looks something like this: var newdiv = document.createElement('div'); newdiv.setStyle({ position: 'relative', width: '100px' ... }); $('someotherdiv').appendChild(newdi

[Prototype-core] Re: setStyle() throwing errors in IE when object does not exist in DOM

2007-05-17 Thread Kickboy
oesn't automatically extend new elements based on their Javascript > prototype > even though it should since that's what prototype programming means. But oh > well. > > -- > Michael Peters > Developer > Plus Three, LP Ah, I get it. That works great. Thanks for you