What is the point of "flattened" things?
Why are there flattened tasks, project, contexts, etc? Several seemingly simple query work with flattened item and I don't understand why they wouldn't work with the not flattened items.
|
The non-flattened versions are nested tree-like structures, and you would have to write a recursive function to 'walk' through them in order to visit every context, or every project in every folder, rather than just the top-level nodes which are immediate children of the document.
The 'flattened' versions are full lists of every node in the tree. |
[QUOTE=RobTrew;125627]The non-flattened versions are nested tree-like structures, and you would have to write a recursive function to 'walk' through them in order to visit every context, or every project in every folder, rather than just the top-level nodes which are immediate children of the document.
The 'flattened' versions are full lists of every node in the tree.[/QUOTE] Fair enough, but why doesn't something simple like: [CODE]set theProject to project named "fooglebar"[/CODE] work, when [CODE]set theProject to flattened project named "fooglebar"[/CODE] does? or is the actual name of the project the full path? |
This will work:
[CODE]tell application id "OFOC" tell default document set oProj to project named "top level project" end tell end tell[/CODE] but only if that project is an immediate child of the document. i.e. if it is a top level project, not contained in a folder. To find a project in a folder you would have to "tell" that folder to [CODE]set oProj to project named "contained in folder"[/CODE] In other words unflattened objects are only found by name within the scope of their containing object (e.g. containing folder for projects, parent context for contexts, containing group or project for tasks). |
[QUOTE=RobTrew;125685]This will work:
In other words unflattened objects are only found by name within the scope of their containing object (e.g. containing folder for projects, parent context for contexts, containing group or project for tasks).[/QUOTE] Thanks you, that completely explains it. |
All times are GMT -8. The time now is 04:27 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.