What happens if you use import instead is require?
It’s a bit ugly, but this should work:
try
eval(Expr(:import, :ImageView))
global view = ImageView.view
catch err
@show err
# fallback to nothing
global view = view(args...; kargs...) = (nothing, nothing)
end
It’s a bit ugly, but this should work:
try eval(Expr(:import, :ImageView)) global view = ImageView.view catch err @show err # fallback to nothing global view = view(args...; kargs...) = (nothing, nothing) end
if isdir(Pkg.dir("ArrayViews"))
eval(Expr(:import,:ArrayViews))
const subarr = ArrayViews.view
else
const subarr = Base.sub
endDoesn't just adding Main in front solve the problem?
view = Main.ImageView.view
--Tim