[Oberon] Class Methods Vs. Procedure variables in Records

Andreas Pirklbauer andreas_pirklbauer at yahoo.com
Tue Mar 7 13:59:47 CET 2017


> Srinivas Nayak sinu.nayak2001 at gmail.com Tue Mar 7 08:12:47 CET 2017
> 
> It seems good, to have one Store command.
> But shall we unify everything on a GUI machinery?
> Shall we imagine only one Save button on a Windows desktop, which will save
> any kind of file opened on any application, finding the actual application
> object from the active window?


It’s probably possible to create a single command for *some* operations that are shared among various tool modules, and use OOP style to implement them. For example, the 3 modules Edit, Draw and System all export the commands Open and Store, the 2 modules Edit and System both have a command Recall, the 2 modules Edit and Draw both export commands ChangeFont, ChangeColor, etc. Such commands could be placed in one module, e.g. module System, and be programmed such that they simple dispatch control one level down to the appropriate handler.

But apart from these common commands there will, in general, always be additional commands specific to the particular tool module such as Edit or Draw. For example, the commands Search and Locate only exist in module Edit, and the commands Macro or Restore exist only in module Draw, etc. And for these, one would still need separate modules exporting them.

I suppose it can be done. I don’t know what ETH’s position would be on that if the discussion were held today.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20170307/71f6ce49/attachment.html>


More information about the Oberon mailing list