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

On Tuesday, August 19, 2014 9:00:39 PM UTC-4, Júlio Hoffimann wrote:

Hi Kevin,
>
> What happens if you use import instead is require?
>>
>
> ERROR: error compiling anonymous: unsupported or misplaced expression 
> import in function anonymous
>
> Júlio.
>
>>  ​

Reply via email to