My intro

Tarmo Tali (tiki@ibs.ee)
Tue, 25 Jun 1996 17:38:06 +0300

Hi!

I'm a last year computer science student of the University of Tartu and
I'm using Oberon/F for writing my bachelor thesis. I'm trying to create
a new, bit more visual program editor (based on idea of Sketchy Programs)
for Oberon. Sketchy programming is a way to represent program languages.
Here is a small example:

This is a small program in some language

FOR (condition1)
do something
IF (condition2)
do something
ELSE
do something else
END IF
END FOR

This is the same program in Sketchy language

-- (condition1)
| do something
| -- (condition2)
| | do something
| <-
| | do something else
| --

--

Generally, some program structures are replaced with graphical notation (sketches and arrows). There is some other neat idea behind it (automatic structure reduction), but this doesn't matter here. So far such environments are made for C and Pascal. But there is the problem that the editor and compiler are not bound closely enough. And it makes developing in Sketchy C (or Pascal) uncomfortable (Sketchy C ---crosscompile---> C ---compile---> Object code ---link---> Executable)

I found that Oberon suits very nicely for such project because 1) Oberon has integrated compiler 2) Oberon has integrated debugger 3) It's possible to bind my editor to both compiler and debugger 4) Oberon is very simple language and it makes it easy to analyze and sketchify

After looking both ETH Oberon and Oberon/F I decided to use Oberon/F.

So far so good ... but ... when I started to write this new editor I found lot's of problems. My first problem is Containers. How can one use them? Is there any success of extending TextViews type? Or just Container type? Can I just extend TextView or should I extend TextModels and TextContollers also? Why I should extend TextViews? Because Oberon compiler takes TextView as an argument instead of TextModel! Why?!? Everywhere in documentation is written, that Model contains Data and View represents them. Why should compiler know how text is represented? I really can't understand this point of design.... OK if I have to extend TextViews ... why not .... but ... I can't :-(. To be more precious. I can't even extend Container :-(. When I tried to do this I ran into some strange traps which I didn't meet when I extended just Views (not Containers). When I'm trying to scroll the view it will lead me to trap. And I don't know why. Is there any wizard around who can create me a simple View, extended from Container? Something like Tools->Create Subsystem will do, but new subsystem should be extension of Container.

Tiki