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

Choose best value type inplementation #89

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paulrd
Copy link
Contributor

@paulrd paulrd commented Aug 5, 2019

This fixes #87 (it was choosing the wrong function. The process for choosing the appropriate constructor / builder function would just choose the first one it found that matched the the set of property keywords. ui/color and presumably others have more than one such function. This PR will i the best constructor available by using a score multimethod that give preference to the constructor / builder that best matches the given args. Right now that is just giving preference to matching clojure Longs with other integer types and Doubles with other float types. This can easily be extended by adding more 'score' multimethods as the need arises.

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.

(ui/text :fill (ui/color ...)) does not set fill property to said color
1 participant