Hi All
I'm trying to update fabrik to use the new 1.5.20 mootools 1.2.4
system plugin, whilst at the same time providing support for mootools
1.1.
I've come across a pretty important issue (well for my code at least),
take a look at this sample code:
Animal = new Class({
test:function(){
alert('animal');
}
});
Man = Animal.extend({
test:function(){
alert('man');
}
});
var rob = new Man().test();
within Joomla 1.5.20 with the mootools upgrade plugin enabled:
* in firefox you get an alert 'man'
* in IE8 you get an alert 'animal'
I have 30 or so classes that rely on .extend, and I can't update them
to use .implement() as that will break them for mootools 1.1
My only current 'fix' for this is to convert all my .js files to .php
files and load them as:
$method = useExtendOrImplement();
JHTML::script('script.php?method='.$method, 'path/to/script');
with the start of script.php looking like:
<?php header('Content-type: text/javascript'); ?>
var FabRadiusSearch = FbTablePlugin.<?php echo $_GET['method']?>({
});
This isn't really a clean solution and I was wondering if the bug was
a known issue and if anything can be done about it?
Looking at
http://github.com/mootools/mootools-upgrade-helper
It says the native objects' extend() method has been altered, but I'm
presuming that doesn't apply to the Class object()?
In fact later on it says:
'All of these items below are addressed in the upgrade helper /
compatibility script.........
Class.extend in 1.1 is accomplished by using the Extends mutator in
1.2.'
HELP! :D
-Rob Clayburn