Macro component useful for coding object methods for widget.