Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Upward propagation of attributes (Read 5505 times)
Rob Forsyth
Full Member
*
Offline



Posts: 63

Upward propagation of attributes
Jul 31st, 2008, 1:00pm
 
I'm sure this will be a near-FAQ, there are similar looking examples in various places but I can't quite get this to work. I have a large outline that is part of a project-planning process where I am trying to boil tasks down into subtasks until I have truly "actionable" items with specifiable results. If a task has subtasks and all of them have $Actionable=true then I want the parent's $Actionable to be true, recursively up the outline, but if I add a new item anywhere I want its default $Actionable to be false (until manually changed), and to thus propagate an $Actionable = false to its parent(s).

Thanks
Back to top
 
« Last Edit: Jul 31st, 2008, 1:03pm by Rob Forsyth »  
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Upward propagation of attributes
Reply #1 - Jul 31st, 2008, 2:18pm
 
How about this container Rule:
Actionable=any(child,$Actionable=true)
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Rob Forsyth
Full Member
*
Offline



Posts: 63

Re: Upward propagation of attributes
Reply #2 - Jul 31st, 2008, 4:56pm
 
I have this as a rule in the prototype defining all items

if (($ChildCount>0)&every(child,$Actionable=true)) {$Actionable=true}

but this doesn't seem to work (i.e. nothing propagates), can anyone see why not?
Back to top
 
 
  IP Logged
Rob Forsyth
Full Member
*
Offline



Posts: 63

Re: Upward propagation of attributes
Reply #3 - Aug 1st, 2008, 1:03pm
 
OK, now have this rule working as intended:

if ($ChildCount!=0) {Actionable=every(child,$Actionable=true)}

which is clearly more elegant but as far as I can tell logically equivalent to the previous version. I would still appreciate understanding why the previous version didn't deliver. I realise its a large piece of work but one day a built-in syntax checker would be a major boon to TBX - you're never quite sure if TBX's failure to act as you hoped is due to a logical flaw or a syntax error...
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print