fallback warnings for missing _writemime and _display

This commit is contained in:
Thomas Breloff 2016-06-26 11:08:06 -04:00
parent 16a2e34e95
commit 2465b3eb5a

View File

@ -149,6 +149,12 @@ end
# for writing to io streams... first prepare, then callback # for writing to io streams... first prepare, then callback
for mime in keys(_mimeformats) for mime in keys(_mimeformats)
@eval function _writemime(io::IO, m, plt::Plot)
warn("_writemime is not defined for this backend. m=", string(m))
end
@eval function _display(plt::Plot)
warn("_display is not defined for this backend.")
end
@eval function Base.writemime(io::IO, m::MIME{Symbol($mime)}, plt::Plot) @eval function Base.writemime(io::IO, m::MIME{Symbol($mime)}, plt::Plot)
prepare_output(plt) prepare_output(plt)
_writemime(io, m, plt) _writemime(io, m, plt)
@ -156,7 +162,6 @@ for mime in keys(_mimeformats)
end end
# --------------------------------------------------------- # ---------------------------------------------------------
# A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert # A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert