Re: New 'GObject' as base for GtkObject?
- From: "Shawn T . Amundson" <amundson eventloop com>
- To: gtk-devel-list redhat com
- Subject: Re: New 'GObject' as base for GtkObject?
- Date: Tue, 21 Dec 1999 17:01:00 -0600
On Mon, Dec 20, 1999 at 11:15:49PM -0800, Bill Huey wrote:
>
> Java has interface inheritence as a means of dealing with MI issues.
>
> Wittness:
>
> class ThreadInterface : Object
> {
> void Run()
> }
>
> class DragNDropInterface : Object
> {
> void dragMethodA();
> ...
> }
>
> class TextFrame extends TextFrameParentClass // inherits all sorts of from the parent object.
> implements DragNDropInterface, ThreadInterface // include these interfaces and fill
> // in the object members.
> {
> ...
> };
>
> Knowning modern OO design *should* be important for the Gtk core folks
> and not knowing that Java has a semi-form MI is a little peculiar to
> say the least.
>
And knowning Java would be helpful before using it for examples. AFAIK,
the above isn't even close to Java code. A few flaws:
* A class or interface is extended using 'extends' not ':'
* You can only use 'implements' for an interface, not classes.
* Interfaces can not extend 'Object' because object is a class, not
an interface. (big flaw)
I think you meant something like this:
public class A
{
void FuncA() {/* ... */};
}
public interface B
{
void FuncB();
}
public interface C
{
void FuncC();
}
public class D
extends A
implements B, C
{
public void FuncB() {/* ... */}
public void FuncC() {/* ... */}
}
-Shawn
--
Shawn T. Amundson amundson@eventloop.com
Research and Development http://www.eventloop.com/
EventLoop, Inc. http://www.snorfle.net/
"The assumption that the universe looks the same in every
direction is clearly not true in reality." - Stephen Hawking
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]