I'm using the Scripting Bridge to control OmniFocus. If I write this code:
I get a crash. "project" is a valid OmniFocus project (I can log its name etc). Calling "project.rootTask" works fine. But when I ask for "flattenedTasks", I get this crash:
The same thing happens if I just ask for "tasks" rather than "flattenedTasks".
Does anyone have any idea why I can't seem to get the child tasks of a task?
Code:
for (OFTask *task in project.rootTask.flattenedTasks) { NSLog(@"Task %@", task.name); }
Code:
2012-07-07 15:17:27.635 OmniReviewer[18623:403] -[SBObject classForCode:]: unrecognized selector sent to instance 0x7fd539607ea0
Does anyone have any idea why I can't seem to get the child tasks of a task?