On Wed, Mar 18, 2009 at 6:51 AM, Gereon A. Frey <[email protected]> wrote:

> Okay, more investigation led to enlightenment:
>
> * Gereon A. Frey <[email protected]> [090318 11:22]:
> [..]
> > // Compute sum
> > var sum = 0;
> > for (var state in states)
> > {
> >   if (bits[state] == null) {
> >     bits[state] = 1<<entry.$$length++;
> >   }
> >
> >   sum += bits[state];
> > }
> >
> > I haven't understood the code fully, but the sum is computed from the
> bits
> > values which seems to be a dictionary of valid values. This could be
> wrong as
> > one would like to add the actually set values, aka
> >   sum += states[state];
> the given code is correct as for each available feature a bit is set to
> differ the available states.
>
> The "error" is in TreeVirtual where the following is done:
>  var states = { opened : node.bOpened };
> This should better be written like:
>  var states = (node.bOpened) ? { opened : true } : {};
>
> This works like a charm, but I'm not quite sure whether the bug is
> really in TreeVirtual or if the API is "wrong" there.
>

Hi Gereon,

Would you please open a ticket for this.

It seems to me that the code in TreeVirtual as presented "should" be correct
and if it's not, there's a problem in the generic state handling rather than
in TreeVirtual, but once the ticket is created, I can work that out with
Fabian.
The only other possibility I can think of is that the bOpened member of the
node object contains a value other than true or false.

Derrell
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to