Oberon Community Platform Forum
December 14, 2019, 05:22:15 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
Oberon Community Platform Forum
>
Development
>
ETH Zonnon
(Moderator:
rmitin
) >
Inheritance
Pages: [
1
]
« previous
next »
Print
Author
Topic: Inheritance (Read 4882 times)
danp
Newbie
Posts: 37
Inheritance
«
on:
May 28, 2008, 06:22:19 PM »
Hello,
I have an object that extends System.Xml.XmlDocument that works fine:
module Util;
type {public, ref} RecordSet = object (data : XmlElement) implements XmlDocument
but I should like to extend it again in another module like this:
module Db;
type {public, ref} RecordSet = object (data : XmlElement) implements Util.RecordSet
and this is not valid. How can I manage that? There is a confusing sentence in section 10.2.1 of the Language Report: "If an object B refines an object A, then B is said to be derived from A". Could an object refines another object? Only definitions could be refined.
Thanks,
Dan
«
Last Edit: May 28, 2008, 06:36:00 PM by danp
»
Logged
rmitin
Moderator
Newbie
Posts: 22
Re: Inheritance
«
Reply #1 on:
June 03, 2008, 04:06:48 PM »
Hi Dan,
only definitions can be refined. Objects in Zonnon are what sealed objects in C# or final objects in Java. If you want to refine it later you need to create a pair definition + implementation, then refine it and then create two (sealed/final) objects when which you will actually use.
Roman
Logged
danp
Newbie
Posts: 37
Re: Inheritance
«
Reply #2 on:
June 06, 2008, 10:36:50 PM »
Hi Roman,
I have understood the Zonnon internal definition + implementation mechanism which is great, but how can I resolve my case? As I could intend, the .Net class is considered as a default implementation, and it could be extended only by the object witch implements it. But is frustrating to not be able to extend it more.
Thank you,
Dan
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> OCP
-----------------------------
Development
-----------------------------
=> General
=> Oberon & Active Oberon
=> AOS
=> WinAOS
=> UnixAOS
=> ETH Oberon
=> ETH Zonnon
=> Merge Requests
=> Bug Report
-----------------------------
Projects
-----------------------------
=> ObeDAV
=> Matrix
-----------------------------
Support
-----------------------------
=> Installation
Loading...