Document Information

Last modified:
2007/08/27 11:50 by hughgibson

This is documentation for qooxdoo 0.7.x only. You might be interested in consulting the latest docs.

Mixins

Mixins are collections of code and variables, which can be merged into other classes. They are similar to classes but can not be instantiated. Unlike interfaces they do contain implementation code. Typically they are made up of only a few members that allow for a generic implementation of some very specific functionality.

Mixins are used to share functionality without using inheritance and to extend/patch the functionality of existing classes.

Defining a Mixin

Example:

qx.Mixin.define("name",
{
  "include": [SuperMixins],
 
  "properties": {
    "tabIndex": {check: "Number", init: -1}
  },
 
  "members":
  {
    prop1: "foo",
    meth1: function() {},
    meth2: function() {}
  }
});
Configuration key Type Description
includeMixin or Mixin[]Single mixin or array of mixins, which will be merged into the mixin.
constructFunctionAn optional mixin constructor. It is called when instantiating a class that includes this mixin.
destructFunctionAn optional mixin destructor.
staticsMapMap of static members of the mixin. The statics will not get copied into the target class. They remain accessible from the mixin. This is the same behaviour as for statics in interfaces
membersMapMap of members of the mixin.
propertiesMapMap of property definitions.
eventsMapMap of events the mixin fires. The keys are the names of the events and the values are the corresponding event type classes.

Using a Mixin

See here for how to attach a mixin to a class.

Mixin Quick Reference

Information

Last modified:
2007/08/27 11:50 by hughgibson

Account

Not logged in

 
 

Rich Ajax Platform (RAP)

RAP uses qooxdoo, Java and the Eclipse development model to build rich web applications. Read more...

qooxdoo Web Toolkit (QWT)

Similar to GWT this framework allows to create impressive qooxdoo applications just using Java. Read more...

Pustefix

Pustefix is a MVC-based web application framework using Java and XML/XSLT. Read more...

 
SourceForge.net Logo

Bad Behavior has blocked 0 potential spam attempts in the last 7 days.