Beginner needs help

Beginner needs help

Post by John Sande » Fri, 10 Jun 2005 17:10:55

I am dabbling in Codewarrior LE, and am havung a problem using PowerPlant.

I am trying to make a TextEdit class into a listener (so it will delete spaces
when a pushbutton is
pressed), so tried making it a mixed LTextEdit and LListener class. Everthing
was going smoothly,
till I added the mixed inheritence ( public LTextEdit, public LListener), then I
keep getting a
compile time error of :-
"Error : illegal use of abstract class ('LListener::ListenToMessage(long, void

which I have worked out comes from me trying to Register_ the mixed class.

Can anyone help me out?

Beginner needs help

Post by David Phil » Sat, 11 Jun 2005 01:59:47

In article < XXXX@XXXXX.COM >,

The error message means exactly what it says: LListener is an abstract
class. You cannot create an instance of an object that inherits from
LListener unless you define

virtual void ListenToMessage(long inMessage, void* userCon);

in YOUR class. The compiler doesn't pick it up until the class is
actually used, which is inside the Register_ macro.

David Phillip Oster