luowy писал(а):
without change this module, extending the type View is no problem;
the three modes is the interface(intent) of design;the SetMode should not break it;
Good point, CopyFromSimpleView can be implemented this way; although
Language Report писал(а):
Methods marked with " - " are "implement-only" exported. Such a method can be redefined in any importing module but can only be called within the module containing the method declaration. (Currently, the compiler also allows super calls to implement-only methods outside of their defining module. This is a temporary feature to make migration easier
So yes, CP2 compiler that is part of BlackBox supports super-calls to implement-only method; however, it is not a language feature, but a compiler peculiarity. The migration they are referring to here is the introduction of CopyFromSimpleView2, like was done in other framework types. I guess the original authors haven't completed the migration.
And as far as allowing for more than just two modes - well, I think it is so convenient to have markers support various modes... A lot of temporary informational views could be implemented based on this interface. Like marking all occurences of a variable in source text, or marking all branches of an IF in a large procedure. In a project I'm doing I implemented error messages with additional subcodes