Hi,

ok, after writing the tutorial I thought I had understood everything 
about object inheritance and qooxdoo properties etc... but now I have 
run into a mystery.

Here is my modifier function:

/**
 * associates data element with data container
 */
QxTarget.prototype._modifyDataContainer = function( propValue, 
propOldValue, propData )
{
    if ( propValue )
    {
        if ( propValue.getChildElement( this.getName() ) !== this )
        {
            propValue.add ( this );
        }
    }
    else
    {
        if ( propOldValue ) {
              propOldValue.remove ( this );   
          };
    };
    return true;
};

it works flawlessly, if I do foo.setDataContainer(bar) , bar will be 
retrieved on executing foo.getDataContainer(). But if I try to access 
the dataContainer property in a different method later, such as

QxTarget.prototype.updateLocal = function ()
{

    var self          = this,
        name        = this.getName(),
        container    = this.getDataContainer();
    alert (container);
}

container will be "null". I don't get it Any ideas?

Christian


_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to