One thing that's confusing me is that if I define "function 
Base.writemime(io::IO, ::MIME"text/plain", plot::Plot)" for a new type it's 
not being used by by show, or it's used after printing the standard show 
text.

On Thursday, 26 June 2014 11:19:23 UTC+1, Samuel Colvin wrote:
>
> I'm getting confused about the most canonical way of outputing types.
>
> I have a custom type (a Plot), I want two output methods, a "rich" method 
> which opens the plot in a separate window, and a "plain" method which just 
> shows a one line text summary of the plot.
>
> I'm confused about which of show, display and writemime to overwrite?
>
> Also how one would use a custom Display type after you've called 
> pushdisplay? Is there a package (other than winston which is confusing me) 
> which uses this?
>

Reply via email to