Trying to extend the keypad delegate for testing really lost

I coded
CCKeypadDelegate pDelegate = new CCKeypadDelegate;
CCKeypadHandler
pHandler = CCKeypadHandler::handlerWithDelegate(pDelegate);
this cannot work since pDelegate is not object and the dynamic cast in initWithDelegate cannot work.

this obviously fail for the same reason
pDirector->getKeypadDispatcher()->addDelegate(pDelegate);
so how do you install a CCKeypadDelegate in a CCKeypadHandler?
I am lost
Andre