# Overload \`show\` for array of custom types

**URL:** <https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589>\
**Category:** General Usage\
**Created:** [March 8, 2018, 8:16am UTC](https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589 "2018-03-08T08:16:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 8, 2018, 9:15am UTC](https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589/2 "2018-03-08T09:15:17Z")

</div>

You can define

```julia
Base.show(io::IO, ::MIME"text/plain", ::Vector{MyType}) =
    print(io, "Hello array of custom elements")

```

and it will work. The problem seems to be that there is a [3-argument `show`](https://github.com/JuliaLang/julia/blob/d386e40c17d43b79fc89d3e579fc04547241787c/base/replutil.jl#L140) defined for `AbstractArray`s which is called by `display` instead of your method. I think this is a known issue, but I can’t locate it ATM.

Also, on how you can find this out: use `@edit` and similar.

Cf. [this discussion](https://discourse.julialang.org/t/how-to-print-arrays-inside-functions/4091).

---

_[View the full topic](https://discourse.julialang.org/t/overload-show-for-array-of-custom-types/9589)._
