Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-20 Thread Dmitriy Sintsov
* Krinkle krinklem...@gmail.com [Mon, 19 Mar 2012 14:32:51 +0100]: Converted all of for..in into $.each(). The most funny thing is that $.each() did not work correctly with sparse arrays [], walking with undefs between real elements. While for..in used to work fine (FF,Chrome,IE8,IE9). So I

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Dmitriy Sintsov
Hi! I've tweaked my code few times, trying to make it simpler: got rid of some closure calls and left only one dynamic module load at client-side. http://pastebin.com/UxyifLmx http://pastebin.com/q3Tm6Ajd http://pastebin.com/4emMDBS6 Still, it gives me headaches, because mw.loader.using(

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Daniel Friesen
On Mon, 19 Mar 2012 00:40:54 -0700, Dmitriy Sintsov ques...@rambler.ru wrote: Hi! I've tweaked my code few times, trying to make it simpler: got rid of some closure calls and left only one dynamic module load at client-side. http://pastebin.com/UxyifLmx http://pastebin.com/q3Tm6Ajd

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Dmitriy Sintsov
* Daniel Friesen li...@nadir-seen-fire.com [Mon, 19 Mar 2012 01:35:21 -0700]: Autoloading classes is not possible. Even if every browser supported getters and we could use them to dynamically load classes, this would require synchronous http calls. Which are absolutely HORRIBLE because they

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Dmitriy Sintsov
* Daniel Friesen li...@nadir-seen-fire.com [Mon, 19 Mar 2012 01:35:21 -0700]: ( function( $, mw ) { } )( jQuery, mediaWiki ); I modified all of three modules: main, view and edit module to the recommended pattern. http://pastebin.com/1kS6EyUu http://pastebin.com/WQzBTw6W

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Daniel Friesen
On Mon, 19 Mar 2012 02:07:54 -0700, Dmitriy Sintsov ques...@rambler.ru wrote: * Daniel Friesen li...@nadir-seen-fire.com [Mon, 19 Mar 2012 01:35:21 -0700]: Autoloading classes is not possible. Even if every browser supported getters and we could use them to dynamically load classes, this

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Krinkle
offtopic On Mon, Mar 19, 2012 at 9:35 AM, Daniel Friesen li...@nadir-seen-fire.comwrote: On Mon, 19 Mar 2012 00:40:54 -0700, Dmitriy Sintsov ques...@rambler.ru wrote: var jqgmap = []; for ( var mapIndex in jqgmap ) { This is VERY bad JavaScript coding practice. Please use $.each().

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Krinkle
offtopic On Mon, Mar 19, 2012 at 2:23 PM, Krinkle krinklem...@gmail.com wrote: On Mon, Mar 19, 2012 at 9:35 AM, Daniel Friesen li...@nadir-seen-fire.com wrote: On Mon, 19 Mar 2012 00:40:54 -0700, Dmitriy Sintsov ques...@rambler.ru wrote: var jqgmap = []; for ( var mapIndex in jqgmap ) {

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Dmitriy Sintsov
On 19.03.2012 17:23, Krinkle wrote: offtopic On Mon, Mar 19, 2012 at 9:35 AM, Daniel Friesen li...@nadir-seen-fire.comwrote: On Mon, 19 Mar 2012 00:40:54 -0700, Dmitriy Sintsovques...@rambler.ru wrote: var jqgmap = []; for ( var mapIndex in jqgmap ) { This is VERY bad JavaScript coding

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-19 Thread Daniel Friesen
On Mon, 19 Mar 2012 06:23:13 -0700, Krinkle krinklem...@gmail.com wrote: offtopic On Mon, Mar 19, 2012 at 9:35 AM, Daniel Friesen li...@nadir-seen-fire.comwrote: On Mon, 19 Mar 2012 00:40:54 -0700, Dmitriy Sintsov ques...@rambler.ru wrote: var jqgmap = []; for ( var mapIndex in jqgmap ) {

Re: [Wikitech-l] Using prototypical inheritance in dynamically loaded ResourceLoader modules

2012-03-18 Thread Dmitriy Sintsov
On 18.03.2012 18:26, Dmitriy Sintsov wrote: replaced 'new MarkerController(...)' calls to 'new mw.jqgmap.MarkerController(...)' calls left from incomplete refactoring of early working (non-broken) revision, however refactored separate view / edit modules code still does not work, with the