-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
No mapping if value from custom boxing is nil #54
Comments
what if you return NSNull ? |
An exception is thrown: |
hmm, can you comment out the type checking just to see if NSNull works to nil out the variable without it ? I don't remember if that should work or not in KVC, can't test this moment. If it works then we can make an exception for NSNull type for pointer properties |
After disabling type checking there is an I'm pretty sure this happens only because i'm using a |
ok, I think we can give NSNull special meaning for boxing, since I doubt we have other use case for it than marking something as failed, so in recap:
I'll have some time over this weekend to implement it, if you are in a hurry I always like PR's :) I'll probably do it with support for NSError as well, so we can fail validation if a KZCall/Boxing is considered invalid as described in #53 |
Are you already working on this? If not, i can try to come up with a PR with the 2 points you mentioned in the next days. |
Go ahead as I'll be in London for next couple of days On Wed, Nov 25, 2015 at 8:09 PM, Bernhard Loibl [email protected]
|
If the value from a boxing method (e.g. in a custom category) returns
nil
no mapping on the instance happens and the old value persists. (see: https://github.com/krzysztofzablocki/KZPropertyMapper/blob/master/KZPropertyMapper/KZPropertyMapper.m#L164)Is there any chance to set a property to nil for custom boxed value?
The text was updated successfully, but these errors were encountered: