oh, I see... Separating XButton from XWindow and reusing the window implementation can be done in a old-style service. But in a new-style service, only one interface a service can inherit. so if I try to separate XButton, there must be a XSomeInterface that inherits XButton and XWindow. The result is my Button that inherits XSomeInterface cant reuse Window implementation.
On Wed, Jul 16, 2008 at 1:11 AM, Mathias Bauer <[EMAIL PROTECTED]> wrote: > Rainman Lee wrote: > >> hello everyone, >> I defined a interfaces tree like this: >> >> XWindow >> | >> | >> XButton >> | >> | >> XImageButton >> >> and I have implemented XWindow in my Window service. >> now I want to implement XButton, XImageButton respectively in Button, >> ImageButton services. >> Is there a convenient method with which I can reuse the Window's >> implementation, instead of reimplementing all XWindow's interfaces in >> Button? >> Thank you very much! > > If XButton wasn't derived from XWindow it would be easy - just have your > button class inherit from the window class, add the additional interface > and implement only the methods from this interface. As XButton includes > XWindow, you must reimplement the methods in your button class, but you > can just forward it to your inherited window implementation. > > Ciao, > Mathias > > -- > Mathias Bauer (mba) - Project Lead OpenOffice.org Writer > OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS > Please don't reply to "[EMAIL PROTECTED]". > I use it for the OOo lists and only rarely read other mails sent to it. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
