This example asks the user for a file, opens the document contained in the file, and appends a string to the text contained in the document. Finally, the text (in its text view) is opened in a window.
After compilation, you can try out the above example:
SamplesEx4.Do
With this example, we have seen how the contents of an Oberon document's root view can be accessed, and how this view can be opened in a window after its contents have been modified. In contrast to SamplesEx1, an existing text has been modified; by first setting the formatter to its end, and then appending new text.
Note that similar to the previous examples, views play a central role.
In contrast to traditional development systems and frameworks, files, windows, and applications play only a minor role in Oberon/F, or have completely disappeared as abstractions of their own. The view on the other hand has become a pivotal abstraction. It is an essential property of views that they can be nested, to form hierarchical documents.
These aspects of Oberon/F constitute a fundamental paradigm shift
from monolithic applications to software components
from interoperable programs to integrated components
from closed programs to open environments
from fully specified requirements to extensible interfaces
from application-centered thinking to document-centered thinking