Document Information

Last modified:
2008/01/11 08:41 by hughgibson

Property Features

Value checks

  • built-in types for most common things
  • instance checks by simply define the classname of the class to check for (always use an instanceof operation - a real classname is not available anymore)
  • custom check method by simply attaching a function to the declaration
  • custom check defined by a string which will be compiled into the resulting setters (faster than the above variant)
  • define multiple possible (primitive) values using an array

Advanced value handling

  • Multi value support. Support to store different values for init, inheritance, style and user including a automatic fallback mechanism between them.
  • Inheritance support. Inhertitance of properties defined by a parent widget e.g. inherit enabled from a groupbox to all form elements. Used the inheritance if the computed value would be undefined or explicitly set to inherit. The getter simply returns inherit for inheritable properties which are otherwise unset.
  • Blocks unintentionally undefined values in all setters with an exception. To reset a value one must use the reset or unstyle method which are available too.
  • Overriding of a value by setting a property explicitely to null
  • Properties must be explicitely configured as nullable (like in .Net). The default is false which means that incoming null values will result in an exception.
  • Accessing nullable properties with undefined values will result in a normalization to null.

Convenience

  • Convenient toggle method for boolean properties

Notification

  • Support for a custom apply rountine
  • Event firing with a custom named event

Initialization

qooxdoo automatically correctly initializes properties. This is true for both, properties which have defined an init value and also for the other properties which are nullable. This means that after you have created an instance the properties are correctly reflecting the applied value. Default values assigned by init also execute the configured apply methods and dispatch configured events to inform already added listeners.

Performance

Automatic optimization of all setters to the optimal highly-tuned result code. Impressive tailor made high performance setters are the result.

Please note that after the definition point of a property the setters are not yet available. Wrappers for them will be created with the first instance and the final code will be generated with the first use of such a setter. This first use will also automatically unwrap the property setter to directly use the generated one.

Memory managment

Automatic memory management. This means all so-configured properties which contain complex data objects get automatically disposed with the object disposal. The affected built-in types are already auto-configured this way. Also all properties which need an instance of a class, defined by using a classname as check are automatically handled.

Note that this does not actually call dispose() on the object but just removes the property value etc i.e. dereferences the object. You still need to call dispose() if necessary.

For all other properties which contain complex data the developer must add a dispose key with a value of true to the property declaration. For example if there is no check defined or the check definition points to a function.

This is not needed for primitive types like strings and numbers.

Information

Last modified:
2008/01/11 08:41 by hughgibson

Account

Not logged in

 
 

Job Offers

To further improve qooxdoo we are seeking javascript developers. Read more...

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.