Troy:

If I read your message correctly, I posit that you may be a C++ programmer
originally,
as it appears you want multiple inheritance.

There is no multiple inheritance in Java except via interfaces.  You could make
a
MyPage interface and a MyJSPage interface and a MySessionUtil interface which
declare the methods in each.  Then create a MyPageImpl class, a
MyJSPageImpl class, and a MySessionUtilImpl class which implement the
interfaces.

Then have pg_MyPage implement MyPage, MyJSPage, MySessionUtil

private MyPage myPage = new MyPageImpl();
private MySessionUtil mySessionUtil = new MySessionUtilImpl();

... and then delegate all the calls:

public void someMyPageMethod() {
     myPage.someMyPageMethod();
}

-- David.



                                                                  
 (Embedded                                                        
 image moved   [EMAIL PROTECTED]                        
 to file:      07/14/99 09:46 AM                                  
 pic19599.pcx)                                                    
                                                                  



To:   [EMAIL PROTECTED]
cc:    (bcc: David P Caldwell/GL/KSC/KeyCorp)
Subject:  [ND] Superclassing problems




Hey all,

I was wondering if someone can help me out.  I have been been creating my
own classes such as MYButton, MyPage etc..
What I am having trouble with though is trying to superclass 2 or more
modules.

i.e.  I have 3 modules:  MyPage, MyJSPage,MySessionUtil

Problem occurs when I want to give pg_MyPage the properties of 2 or more of
these modules.

I end up having to superclass pg_MyPage --> MySessionUtil which I must then
superclass to MyJSPage which is then superclassed to MyPage

This implementation works fine... but then I lose the ability to implement
only MySessionUtil or MyJsPage by themselves.

I know I have probably gone about this the wrong way and I would really
appreciate any suggestions.



Thanks,

Troy

Troy McKinnon
Technical Team Leader
Integrated Quality Management System
Nortel Networks - GHCT  (Dept. 1J11)
(613) 765-7685  or  ESN (395) 7685

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]


pic19599.pcx

Reply via email to