Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image method cannot be provided no parameters #89

Open
matgrioni opened this issue Oct 3, 2016 · 0 comments
Open

Image method cannot be provided no parameters #89

matgrioni opened this issue Oct 3, 2016 · 0 comments

Comments

@matgrioni
Copy link

Below is the current implementation of the Image class. This does not allow for an image widget to be created with no specified path, which is quite useful when you are creating the layout but do not yet know which image you are to load.

class Image < Basic
    def initialize args
      @path = args[:path]
      args.delete :path
      super args      
    end

    def path=(name)
      @path = name
      @real.clear
      args = {width: @width, height: @height, noorder: true}
      args.merge!({hidden: true}) if @hided
      @real = @app.image(name, args).move(@left, @top).real.tap{@app.flush}
    end
    ...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant