Stefan H. Holek wrote:
To answer your question, savedState and newState are the ones competing for "final" state. Do not get confused by the (badly chosen) parameter names ;-). Your job is to resolve this conflict by e.g.
intermediateState = merge(oldState, savedState) finalState = merge(intermediateState, newState) return finalState
I understand that, in theory. :-) In practise, I saw that oldState and savedState were equal. I don't see the conflict. Therefore, I don't know how to 'merge' the states. Can I assume there is no real conflict then, and return the newState? BTW, I made a typo in my previous post: willem wrote:
'oldstate == savedstate' [...] I would like to know what's going on here. For example, if 'oldState == newState', can I safely assume that newState is correct and there's no need to merge changes (which changes?) between oldState and savedState?
I meant 'oldState == savedState' here, referring to the part above. Not 'oldSate == newState'. - Willem