in DevCommanders is not always set as expected. For most situations this is irrelevant in practice,
but there are bugs indeed (OberonCore B11).
See the issue at http://redmine.blackboxframework.org/issues/52.
A proposal for fixing this exists in CPC 1.7 rc5.
I have put those changes into topic branch issue-#52.
See the diffs at http://redmine.blackboxframework.org/pr ... a44fb7ec1e.
I have slightly modified the proposal:
1. the test for v # NIL is not required because it is implied by ~r.eot.
2. similar changes have been applied to ScriptConfig, our internally used scripting mechanism for the BlackBox build engine.
When studying the changes the following question came up:
What is Properties.ThisType good for in GetParExtend as shown below?
It is a rarely used and undocumented feature of BB. OberonCore originally replaced it
by Services.Is but later changed it back to using Properties.ThisType again.
(Note: Instead of Services.Is a better replacement would have been to simply use the type test operator IS.)
I cannot find a reason why Properties.ThisType is required and it is not clear to me what it is used for in general.
Code: Select all
PROCEDURE GetParExtend (r: TextModels.Reader; VAR end: INTEGER);
VAR v: Views.View;
BEGIN
IF r.view # NIL THEN v := r.view ELSE r.ReadView(v) END;
WHILE ~r.eot
& (Properties.ThisType(v, "DevCommanders.View") = NIL)
& (Properties.ThisType(v, "DevCommanders.EndView") = NIL) DO
r.ReadView(v)
END;
end := r.Pos(); IF ~r.eot THEN DEC(end) END
END GetParExtend;