Hello!
Im wondering how can i create custom functions like onSizeChange()?
Im trying to create something like Task::onStateChange().
In my Group class i have array of tasks.
Group::pushTask(){
tasks.push_back(Task::create());
tasks.[tasks.size-1]->onStateChange(&Group::TaskStateChanged,this,tasks.size()-1);
}
Group::TaskStateChanged(int index){
tasks[index]->....
...
}
So when task changes state in scope Group::TaskStateChanged will be called.
Thanks!
Im wondering how can i create custom functions like onSizeChange()?
Im trying to create something like Task::onStateChange().
In my Group class i have array of tasks.
Group::pushTask(){
tasks.push_back(Task::create());
tasks.[tasks.size-1]->onStateChange(&Group::TaskStateChanged,this,tasks.size()-1);
}
Group::TaskStateChanged(int index){
tasks[index]->....
...
}
So when task changes state in scope Group::TaskStateChanged will be called.
Thanks!