Closed ducker closed 9 years ago
Hi,
I was thinking about just removing that line, but I don't know all usecases so I decided to make another method just to refresh binding when assigning view model. I couldn't find a better way to keep reference to transform block and I agree that it doesn't look good. It was just a quick hack in my project and to be honest I accidentally created pull request to your branch instead of mine. I wanted to open git issue in your repo but I just left PR. I don't see any potential issues with code above so maybe it's better solution.
2015-04-16 21:48 GMT+02:00 Marko Hlebar notifications@github.com:
Hey @ducker https://github.com/ducker thanks for the PR and spotting the issue. I would like to look at a more elegant way of solving this though. Would simply removing self.transform = nil work? As in
(void)unbind { [self removeObservers];
self.leftObject = nil; self.rightObject = nil;
[BNDBindingObject_bindings removeObject:self]; }
I think that preserving the transform should probably be the default behaviour anyways. What do you think?
— Reply to this email directly or view it on GitHub https://github.com/markohlebar/BIND/pull/11#issuecomment-93824686.
@ducker yeah I see that you took the conservative approach :) If you have time to test and make the above stuff into a PR I would appreciate it. Cheers!
@ducker good stuff thanks!
Hey @ducker thanks for the PR and spotting the issue. I would like to look at a more elegant way of solving this though. Would simply removing
self.transform = nil
work? As inI think that preserving the
transform
should probably be the default behaviour anyways. What do you think?