Overload `show` for array of custom types

You can define

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 defined for AbstractArrays 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.

2 Likes