Evaluatable debug#2009
Merged
diogotr7 merged 6 commits intoantonpup:devfrom May 17, 2020
Wibble199:feature/evaluatable-debug
Merged
Evaluatable debug#2009diogotr7 merged 6 commits intoantonpup:devfrom Wibble199:feature/evaluatable-debug
diogotr7 merged 6 commits intoantonpup:devfrom
Wibble199:feature/evaluatable-debug
Conversation
Now 'Evaluate' is handled by the abstract Evaluatable{T}, which calls a protected abstract 'Execute' method. This 'Execute' is that one that should be overriden to provide evaluatable logic. 'Evaluate' should still be called when getting the value from an evaluatable.
The most recent value from evaluatables is now stored, with the aim of helping to provide debugging information.
…erride in the editor UI.
This is because the value may not actually be the current value if the evaluatable isn't updated (e.g. in a false branch of an if-else).
diogotr7
approved these changes
May 17, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a togglable (checkbox in the top right of the overrides editor, defaults to off) display next to evaluatable blocks that will show their latest evaluated value.
Note that this also changes the signatures slightly for evaluatables in code. The interface
IEvaluatable{T}has been replaced with an abstract classEvaluatable{T}, which handles some of theIEvaluatablemethods and handles storing the most recent value. There exists an abstract methodExecuteon theEvaluatable{T}which is what should now be overriden to provide evaluatable logic. The methodEvaluateshould still be called when getting the value of an evaluatable.Note that the type binder has been updated to support converting
IEvaluatable{T}toEvaluatable{T}. This means previously created override logic will seamlessly transition, but any logic created with this version will not work on versions whereIEvaluatable{T}is still used.