Google Wave Gadgets using MooTools

Avital Oliver / September 7th, 2009 § 2 comments

We have been using MooTools to develop our gadgets and that wasn’t causing any problems on top of our emulator. But apparently our gadgets weren’t working on the real Wave sandbox. After a lot of debugging it turned out that Wave’s JSON object conflicts with MooTools’ own JSON object. In order to use develop Wave gadgets using MooTools, use the MooTools Core Builder and remove the JSON component.

If you still want to encode and decode JSON, you can use Wave’s HTML 5-compliant JSON functions (JSON.stringify and JSON.parse instead of MooTools’ JSON.encode and JSON.decode).

Update: Rasmus Fløe brought up a much simpler solution which allows you to still use MooTools’ JSON API. Instead of ommitting MooTools JSON from Core, just extend the JSON object: $extend(JSON, {stringify: JSON.encode, parse: JSON.decode});

Here’s the source code for task list gadget and the original blog post about it.

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

§ 2 Responses to “Google Wave Gadgets using MooTools”