timconkling
New member
Hi there,
I'm finding ParentTask to be tricky to understand - specifically, the circumstances in which certain functions are called.
I'd _love_ if each of these functions had detailed docs saying "this will be called when X happens, if Y is true", or whatever. (I'd be happy to help in this effort as well, if it makes a difference! I just need to get un-confused on some of these details first.)
Thanks!
Tim
I'm finding ParentTask to be tricky to understand - specifically, the circumstances in which certain functions are called.
- What's the difference between "Decorate(TaskStatus)", "OverrideStatus(TaskStatus)" and "OverrideStatus()"? They all seem to be capable of modifying the result of a child task.
- What's the difference between OnChildStarted() and OnChildStarted(childIndex)? Is it just that the latter will only be called for tasks with parallel tasks? Why is the distinction useful (that is, why not pass childIndex in both circumstances)?
- Similarly, what's the difference between the two forms of OnChildExecuted()?
- Where does the TaskStatus passed to OnReevaluationEnded() come from?
- Is it true that OnChildExecuted() is only called when a child task has ended (or become disabled)? The name is a bit confusing, especially since "CanExecute" is called to determine - I believe! - whether a child can _start_ running.
- What are the circumstances that a ParentTask's Update function will be called? It seems that the parent task needs to return true from CanReevaluate, and also not be marked as Instant?
- What does the result of a ParentTask's OnUpdate mean? (It seems like returning Failure from a ParentTask's Update is meaningful, but all the other task statuses essentially mean the same thing?)
- OnReevaluationStarted/Ended say that they "notify the parent task that a reevaluation has been requested". Is this called when a reevaluation is requested by an immediate child? Any descendent?
I'd _love_ if each of these functions had detailed docs saying "this will be called when X happens, if Y is true", or whatever. (I'd be happy to help in this effort as well, if it makes a difference! I just need to get un-confused on some of these details first.)
Thanks!
Tim
Last edited: