Skip to content

Conversation

@Mikulas
Copy link
Contributor

@Mikulas Mikulas commented Oct 22, 2015

  • setReadOnlyValue internally calls
  • internalSetValue which in turn may call
  • setValue, which has isReadOnly check

credit goes to @JanTvrdik for this solution

@hrach
Copy link
Member

hrach commented Oct 22, 2015

At the beginning I wonder why you are pointing to @JanTvrdik. When I saw it, I understood it. I don't like the implementation! :) Currently, I don't know if it's a better way how to fix it...

@Mikulas
Copy link
Contributor Author

Mikulas commented Oct 22, 2015

It seems a little bit like a hack, but it's way better than propagating an $ignoreReadOnlyCheck through the (very deep) call stack. That would also make the API worse, with all those public methods having an additional boolean argument. Static/global ignore flag would also be worse.

@hrach
Copy link
Member

hrach commented Oct 22, 2015

Yeah, I know. But the problem is, that it is too recursive. Recursion is fortunatelly stopped, but it may have been stopped a layer earlier.

@JanTvrdik
Copy link
Member

@hrach You can always refactor it later, but this is fast, simple and reliable solution for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants