Skip to content

Image method cannot be provided no parameters #89

Description

@matgrioni

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions