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

Added optional constructor arguments to 'construct' and made 'base-resource-options' public. #173

Merged
merged 1 commit into from Jun 9, 2014

Conversation

MIvanchev
Copy link
Contributor

This resolves #172. The motivation behind the changes is to be able to write libraries which use the seesaw facilities to provide more components. Especially components which are not likely to be included in future versions of seesaw. Consider a possible extension my-custom-lib.core containing code for a seesaw-ish JMyCustomComponent wrapper:

(def my-custom-component-options
  (merge
    default-options
    (option-map
      (resource-option :resource base-resource-options)
      ...)))

(widget-option-provider JMyCustomComponent my-custom-component-options)

(defn my-custom-component
  "TODO"
  [& opts]
  (apply-options
    (construct JMyCustomComponent ...)))

The need for making base-resource-options public is self-explanatory. The addition of optional parameters to construct is driven by the fact that some components do not have no argument constructors.

daveray added a commit that referenced this pull request Jun 9, 2014
Added optional constructor arguments to 'construct' and made 'base-resource-options' public.
@daveray daveray merged commit a371127 into clj-commons:develop Jun 9, 2014
@daveray
Copy link
Collaborator

daveray commented Jun 9, 2014

Thanks!

@MIvanchev MIvanchev deleted the fix-172 branch June 22, 2014 10:06
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

Successfully merging this pull request may close these issues.

None yet

2 participants