You're right! Thanks! So what you suggest, is to have some kind of CallbackListener class from which the objects I want to manipulate inside the button handling code inherit? That would solve my problem. But, in a more general way, how would you do it? I mean to pass the address of an int for example, which is does not inherit from a CallbackListener class...the Button class does not know what object it will receive as an argument...unless the Butoon class is a template class. But let's not go that far
EDIT : removed unnecesary content.