in 10.1B01,
given the following two classes:
CLASS experimental.foreach :
DEF PROTECTED TEMP-TABLE A
FIELD x AS CHAR
FIELD Y AS CHAR
INDEX X IS PRIMARY UNIQUE
X
INDEX Y
y.
METHOD PUBLIC LOGICAL CreateData():
CREATE a.
a.x = "1".
a.y = "2".
END METHOD.
END CLASS.
/* */
USING experimental.foreach.
CLASS experimental.class1 INHERITS foreach :
METHOD PUBLIC LOGICAL broken():
createdata().
FOR EACH a NO-LOCK by a.x:
MESSAGE a.x VIEW-AS ALERT-BOX.
END.
FOR EACH a NO-LOCK BREAK by a.x:
IF AVAIL a THEN MESSAGE a.x VIEW-AS ALERT-BOX.
ELSE MESSAGE "ooops. break by broken" VIEW-AS ALERT-BOX.
END.
END METHOD.
END CLASS.
/* */
when you run:
def var q as class experimental.class1.
q = new experimental.class1().
q:broken().
delete object q.
/* */
I get "1" and "ooops. break by broken"
can someone confirm that this is broken in 10.1B00 and / or 10.1A ?
thanks
I have been told by Wim that this does not work in vanilla 10.1B00