MooTools More 1.2.2.2

Written By Aaron Newton, on Tuesday, May 5th 2009, 5:51pm

Today we’re releasing a small update to MooTools More that address a few bugs and minor feature requests that cropped up after the initial launch. Briefly, these are the things changed since 1.2.2.1:

  • Removed debug statement that enabled IframeShim in all browsers by default
  • Fixed a few docs typos
  • Removed UTF-8 charset signature on String.QueryString and URI.Relative
  • Assets.image now have an onError option and handle image load failure more gracefully
  • FormValidator.Inline had issues displaying some of it’s validators when input values changed
  • OverText now allows you to specify the element type for the label test (defaults to “label”)
  • Fixed an issue with addRequests in Request.Queue; the arguments were reversed (addQueue still worked fine though)

None of these changes should affect your usage of the class, except, possibly, the change to OverText, as the element it previously created for the labels was a div. If you styled these with css and referenced the tag name, you’ll either need to update your css reference or pass in element: “div” as an option when you invoke the class.

MooTools 1.2.2 and the New MooTools More

Written By Valerio Proietti, on Thursday, April 23rd 2009, 7:53pm

Today we’re releasing two goodies for you: MooTools 1.2.2 and the new MooTools More (1.2.2.1).

Core

MooTools 1.2.2 is a mainly a bug fix release but it also includes an almost entirely new Class.js. The reasoning behind this is that the old Class.js didn’t play nicely with some advanced usages of this.parent() present in the new MooTools-More. We already had the script ready and tested in the MooTools 2.0 branch so we simply “backported” it to 1.2.2. Other than providing the parent fixes, the new Class also features a much more robust inheritance model, especially when dealing with objects.

For example, the objects you implement now in a class are merged if an object with the same name is found in the class prototype:

var Animal = new Class({
    options: {
        color: 'brown',
        says: 'hissss'
    }
});

Animal.implement('options', {says: 'meow'});

// Animal.prototype.options is now {says: 'meow', color: 'brown'};

This is especially useful when overriding default options in classes, such as Request.

Another object-oriented feature we introduced is that now sub-objects are actually inherited Parent-to-Child. If you implement a new option in Animal, then Cat, which is a subclass of Animal, will get the new option as well, and so will every instance already existing. An example:

var Cat = new Class({
    Extends: Animal
});

var kitty = new Cat();

Animal.implement('options', {nu: 'one'});

Cat.prototype.options.nu == 'one' //true
kitty.options.nu == 'one' //true

This obviously also applies to methods.

Additional changes to the MooTools Core in 1.2.2 are mostly minor bug fixes.

More

One of the new features of MooTools-More, since the last RC, is that it is now possible access the previous state of overwritten methods of classes through Class.refractor. An example:

var Cat = new Class({
    energy: 0,
        eat: function(){
            this.energy++;
    }
});

Cat = Class.refactor(Cat, {
    eat: function(){
        this.previous(); //energy++!
        alert("this cat has " + this.energy + " energy");
    }
});

This functionality allows users to integrate seamlessly with existing classes, and add to existing methods without the need to subclass.

We’re considering some way to make this behavior more generic for a possible inclusion in MooTools-Core 2.0.

The first RC of MooTools-More produced a lot of feedback and contributions that we’ve integrated as we prepared for our full release. Following this full release of the new MooTools More plugins, we’ll begin adding new features quickly and regularly with what we hope will be biweekly releases.

A New Name for MooTools

Written By Valerio Proietti, on Wednesday, April 1st 2009, 12:00am

UPDATE: Sincere thanks to all of you who actually believed this was real news! April Fools’ wouldn’t be as much fun without you.

The MooTools project has been around for quite some time now. We’ve seen a few releases, some great, some less great (1.0). We’ve coded tons of plug-ins, scripts, websites, applications and desktop applications using our beloved MooTools. However, the community is really starting to get tired, tired of this project name. I mean, seriously, we’re really fed up with cows. We even tried to “sell” it as My Object Oriented Tools, but we all know that’s a stretch, and a pretty bad one.

Read the rest of this entry »

More To Love

Written By Aaron Newton, on Monday, March 9th 2009, 5:28pm

I know, sometimes when you look at the source code of MooTools you ask yourself, “How could this possibly be any better? Because it’s so awesome.” I am by and large always stumped by this question, as the code is so meticulously maintained by its authors.

Today, I have an answer. The only way to give you a better MooTools is to give you more of it. It’s that awesome. Today, we’re making MooTools awesomer.

We give you the new and improved MooTools More - the official plugin collection for MooTools. The plugins we are releasing today take the fifteen files previously in MooTools More and triple them. That’s three times the awesome!

Read the rest of this entry »

2009, The Year of the Cow - What’s Coming with MooTools

Written By Aaron Newton, on Monday, February 2nd 2009, 8:51pm

Ok, it’s the year of the Ox, but you get the idea. Regardless, it’s shaping up to be a very interesting one for MooTools. There are many things going on with the framework and we thought we’d give you a heads up on what you should expect in the coming weeks and months.

Read the rest of this entry »