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

Use auto-boxing for primitive initializer injections. #154

Closed
jasperblues opened this issue Jan 27, 2014 · 6 comments
Closed

Use auto-boxing for primitive initializer injections. #154

jasperblues opened this issue Jan 27, 2014 · 6 comments
Assignees
Labels

Comments

@jasperblues
Copy link
Member

No description provided.

@jasperblues
Copy link
Member Author

relates to #153

@ghost ghost assigned alexgarbarev Jan 27, 2014
@alexgarbarev
Copy link
Contributor

I did it. But it's looks like KVC implementation.. but may be more dumb.
Maybe my idea about KVC was bad because we have to implement 'our own' KVC for initializers..
Lets keep it as is for now. I belive that KVC is more clever..

@jasperblues
Copy link
Member Author

👍 For now, I think its enough to clearly document any short-comings - types that can be injected with properties but not initializers.

I don't think your idea was a bad one. There are already some differences between initializer injection and property injection. For example, initializers don't support automatic 'by type' injection - finding the right candidate based on the required type. The runtime doesn't support this.

In the case of primitives and rolling our own KVC later - I'm sure that library would be well received by the Objc community.

Important

There is one problem with your commit:

  • We need the tests to work on both iOS and OSX. Normally the build server would pick this up, but its currently only running the iOS Tests because I'm migrating the hard-to-maintain Ant build to gradle. . . in the meantime can you please run both iOS and OSX test targets in the IDE.

To test the same functionality:

  • Perhaps there's another common struct we can use?
  • Or we can make an iOS only test.
  • Or we can wrap it in an #ifdef

@jasperblues
Copy link
Member Author

Reopen due to minor issue with Tests vs iOS / OSX

@jasperblues jasperblues reopened this Jan 27, 2014
@alexgarbarev
Copy link
Contributor

Fixed by NSRange

@jasperblues
Copy link
Member Author

👍 Great work Aleksey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants