[jQuery] Re: Plugin scope for methods and 'this'

2007-07-12 Thread Tane Piper
Hi folks, Ok I've put up a small demo site at http://webrocket.ulmb.com This is not quite the final version, but you can: * type in your zip/postcode or address into the search box and find your address on the map. * drag the marker that it creates to pinpoint a location. * with firebug, you c

[jQuery] Re: Plugin scope for methods and 'this'

2007-07-12 Thread Tane Piper
Thanks, but on IRC and thanks to the amazing Dave Cardwell, I've managed to fix this. I'm going to clean it up and write a full demo page tommorow, and I'll be releasing it. I'll have a look over your email tomorrow (as it's hometime now) to see if there are any other tips that I can use to opti

[jQuery] Re: Plugin scope for methods and 'this'

2007-07-12 Thread Michael Geary
Tane, load your page in Firefox with Firebug enabled. Open the Firebug pane and click Script, then turn on Options/Break on All Errors. Now do your address lookup. Firebug will stop on your line with the error. Look at what is displayed in the Watch window. Observe that "this" is the Window objec

[jQuery] Re: Plugin scope for methods and 'this'

2007-07-12 Thread Tane Piper
Hello again, I really need to try nail this plugin so I can move on to other things in the project. This bit forms an important part of my event system, and possibly other parts of my application, but i'll also be releasing this code to the community. What I've done is, because the Geocoder wi

[jQuery] Re: Plugin scope for methods and 'this'

2007-07-11 Thread Tane Piper
Scratch that, bug 1 fully fixed now $("#gmap").GMap2().setCenter(new GLatLng(53.1767260605,-20.3427745698), 2); On 7/11/07, Tane Piper <[EMAIL PROTECTED]> wrote: I've just uploaded a demo to http://webrocket.ulmb.com/ Thanks to someone on IRC, I seem to have fixed error 1 by changing my retur

[jQuery] Re: Plugin scope for methods and 'this'

2007-07-11 Thread Tane Piper
I've just uploaded a demo to http://webrocket.ulmb.com/ Thanks to someone on IRC, I seem to have fixed error 1 by changing my return in the GMap2 function to: return this[0].GMap2; and then defining the function in the namespace: jQuery.fn.GMap2 = jQuery.gmapp.GMap2 However, when I call the me