What was intended with 'cascade' [Bug 499, cascade prematurely ends traps]

Jeff Buhrt <[email protected]>
Newsgroups gmane.comp.java.xwt.core
Message-ID <[email protected]>
Was it intended that 'cascade' was supposed to be like a function call like in Lithium,
or like a labeled break in Java?


The bug:
http://bugs.xwt.org/show_bug.cgi?id=499

The manual 'cascade = "blah";' that Charlie has will immediately cascade to the next lower trap, which is correct per the N reference.
The 'ibex.log.info("Second");' code will never be called because it is after the cascade.
The Nitrogen reference does not say anything about what happens after a 'cascade'.
Thus if execution control returns to the 'caller' of a cascade, or if cascade is a 'jump'.



      8.4 Manual Cascades

There are two additional tricks you can use when placing traps. The 
first is a /manual cascade/. If you want to cascade to lower traps in 
the middle of a function, or you want to cascade with a different value 
than the value passed to you (in effect "lying" to lower traps), you can 
use cascade.


Charlie implied it should be like Lithium, but this comment from Adam says otherwise:
http://marc.theaimsgroup.com/?l=xwt-core&m=106422545315218&w=2
Basically it says cascade is a property vs a function like it was in Li.
[I assume thus *not* being a function call.]

How without it being a function call should Charlie layer the widgets?

The testcase from bug499:
<ibex>
    <ui:box>

        thisbox.test;

        test ++= function(v) {
            ibex.log.info("First");
        }

        test ++= function(v) {
            cascade = v;
            ibex.log.info("Second");
        }

        test = true;

    </ui:box>
</ibex>

-Jeff

_______________________________________________
core mailing list
[email protected]
http://lists.xwt.org/listinfo/core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.