How to override a View action?

I’m writing a kind of special button which overrides View (actually it overrides a subclass of SCViewHolder but I don’t think that’s relevant). I want to override some of the mouse events so that they always do a thing, and then do whatever the user specified as the action.

So the overridden method looks something like:

mouseEnterAction_ {
	|func|
	// it should always do this thing when the mouse enters the view
	base.mouseEnterAction_(func); // Then do the user-assigned thing
}

So it’s like the user-supplied function should be merged somehow with a some pre-existing function before being set as the handler - hope this makes sense.

I charged into this thinking it would be straightforward. Now I’ve spent about an hour thinking about it and Googling, and I haven’t a clue how to do it.

Sorry, it suddenly came to me:

mouseEnterAction_ {
	|func|
	super.mouseEnterAction_({
		|view,x,y|
		postln("Do some standard thing you always want to be done here");
		func.value(view,x,y);
	});
}