From 0005c2247a1cfbcc895d736abffb66384083aa9f Mon Sep 17 00:00:00 2001 From: PoweredByPie Date: Fri, 16 Jan 2026 23:52:56 -0800 Subject: [PATCH 1/2] fix small typo in tasks tutorial --- tutorials/tasks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/tasks.md b/tutorials/tasks.md index 959a2636..73d0755b 100644 --- a/tutorials/tasks.md +++ b/tutorials/tasks.md @@ -104,7 +104,7 @@ m_taskListener.bind([](SumTask::Event* event) { // You can also assign a member function m_taskListener.bind(this, &MyCoolClass::onSumTask); -void MyCoolClass::onTask(SumTask::Event* event) { +void MyCoolClass::onSumTask(SumTask::Event* event) { // Handling code } ``` @@ -112,7 +112,7 @@ void MyCoolClass::onTask(SumTask::Event* event) { To implement the actual business logic of our listener, we need to look at the details of the event. Note that the `Task::Event` type can report three different kinds of states: the Task having finished, the Task having progressed, and the Task having been cancelled. **You should pretty much always handle all three of these states**, unless the Task doesn't have any progress type, or you don't care about intermediate progress. ```cpp -void MyCoolClass::onTask(PointlessTask::Event* event) { +void MyCoolClass::onSumTask(PointlessTask::Event* event) { // Check if we have a value; getValue() always returns a pointer if (uint64_t* result = event->getValue()) { // The Task completed successfully! Do what you need with the value. From 189cacb14b37292855d56a1fc26218485d6b4bdc Mon Sep 17 00:00:00 2001 From: PoweredByPie Date: Fri, 16 Jan 2026 23:55:45 -0800 Subject: [PATCH 2/2] actually this one is not related to the last example lol --- tutorials/tasks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/tasks.md b/tutorials/tasks.md index 73d0755b..89b14419 100644 --- a/tutorials/tasks.md +++ b/tutorials/tasks.md @@ -112,7 +112,7 @@ void MyCoolClass::onSumTask(SumTask::Event* event) { To implement the actual business logic of our listener, we need to look at the details of the event. Note that the `Task::Event` type can report three different kinds of states: the Task having finished, the Task having progressed, and the Task having been cancelled. **You should pretty much always handle all three of these states**, unless the Task doesn't have any progress type, or you don't care about intermediate progress. ```cpp -void MyCoolClass::onSumTask(PointlessTask::Event* event) { +void MyCoolClass::onTask(PointlessTask::Event* event) { // Check if we have a value; getValue() always returns a pointer if (uint64_t* result = event->getValue()) { // The Task completed successfully! Do what you need with the value.