The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
What is the point of "flattened" things? Thread Tools Search this Thread Display Modes
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:
Originally Posted by RobTrew View Post
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.
Fair enough, but why doesn't something simple like:

Code:
set theProject to project named "fooglebar"
work, when

Code:
set theProject to flattened project named "fooglebar"
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
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"
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:
Originally Posted by RobTrew View Post
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).
Thanks you, that completely explains it.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 05:32 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.