quite a mystery: show method giving inconsistent outcomes when triggered indirectly or directly

Hello Community,

I am trying to figure out what is for me a mystery. (the R markdown of the reproducible error is here RPubs - show_mystery)

In the package tidyHeatmap branch redefine-show

install with devtools::install_github("stemangiola/tidyHeatmap@redefine-show")

I have the show method as such

#' @importFrom ComplexHeatmap Heatmap
setMethod("show", "InputHeatmap", function(object){

  object@input = [...]

  print("This show function is called")
  do.call("Heatmap", object@input)

} )

If I enter in the R console (which triggers show function automatically, unless there is something I don't understand)

> my_InputHeatmap

I get

> [1] "This show function is called"

and I don't get the object from do.call("Heatmap", object@input).

While if I call show directly

> show(my_InputHeatmap)

I get

>  [1] "This show function is called"


I would like the two calls to behave consistently
Thanks a lot.

Best wishes.
Stefano