[jQuery] OO programming is confusing to old functional programmers

2006-11-11 Thread Stephen Woodbridge
OK, How much of this is right? jQuery.Map = { // this is a public global attribute? // ie: global across all instances of jQuery.Map whatever : null, // a public function init : function(options) { // this is the jQuery search collection // self is

Re: [jQuery] OO programming is confusing to old functional programmers

2006-11-11 Thread Michael Geary
I don't think this approach will work quite the way you'd like. In your example: // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Those two $(#myMap) calls are going to result in

Re: [jQuery] OO programming is confusing to old functional programmers

2006-11-11 Thread Stephen Woodbridge
Michael Geary wrote: I don't think this approach will work quite the way you'd like. In your example: // I access my plugin via: $(#myMap).Map({ options hash }); // later I can access a public function on this object like: $(#myMap).Map.recenter(x, y, dxy); Those two $(#myMap) calls