Skip to content

Evaluatable debug#2009

Merged
diogotr7 merged 6 commits intoantonpup:devfrom
Wibble199:feature/evaluatable-debug
May 17, 2020
Merged

Evaluatable debug#2009
diogotr7 merged 6 commits intoantonpup:devfrom
Wibble199:feature/evaluatable-debug

Conversation

@Wibble199
Copy link
Collaborator

@Wibble199 Wibble199 commented May 14, 2020

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 class Evaluatable{T}, which handles some of the IEvaluatable methods and handles storing the most recent value. There exists an abstract method Execute on the Evaluatable{T} which is what should now be overriden to provide evaluatable logic. The method Evaluate should still be called when getting the value of an evaluatable.

Note that the type binder has been updated to support converting IEvaluatable{T} to Evaluatable{T}. This means previously created override logic will seamlessly transition, but any logic created with this version will not work on versions where IEvaluatable{T} is still used.

Wibble199 added 6 commits May 14, 2020 13:44
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.
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 diogotr7 merged commit 5a1befd into antonpup:dev May 17, 2020
@Wibble199 Wibble199 deleted the feature/evaluatable-debug branch May 17, 2020 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants