I have two separate classes (A = a subclass of BevelButtom, B = a subclass of PushButton). Both A and B implement a number of identical methods in exactly the same way. Since both subclasses' superclasses are different and since RB doesn't support multiple inheritance, all I can do to tie these methods together is define a class interface, have both subclasses implement the interface, then copy/paste the method bodies in each subclass.
That offends my sensibilities. Is there a way in RB to extract this common logic elsewhere?
Thanks!
Using an interface seems like the right approach, but rather than copying the method bodies to each subclass, I think it makes more sense to create a new class (say CommonButtonStuff) with the common code. Then you can call it in the implemented methods: