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
for() (Read 5043 times)
Sebastian Stephenson
Full Member
*
Offline



Posts: 100

for()
Mar 31st, 2009, 10:10am
 
is there a for() in tinderbox exports codes as I can't seem to find one in the manual and if there is not is there a workaround

I am trying to do this

for all the notes that have prototype A place then in here with the template of the note/s

thanks
Back to top
 
« Last Edit: Mar 31st, 2009, 10:11am by Sebastian Stephenson »  
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: for()
Reply #1 - Mar 31st, 2009, 10:23am
 
As in a loop construct, e.g. for(i=0;<count;i++) {} sort of thing? No.  Use an agent to match the tiems to be worked on and the agent action does the per-item work. So, in v4.6+ syntax, a sample agent's code:

AgentQuery:  $Prototype=="A"
AgentAction: $Color="bright blue";$IsDone=true;
Back to top
 
 

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



Posts: 100

Re: for()
Reply #2 - Mar 31st, 2009, 10:44am
 
ok thanks
Back to top
 
 
Sebastian Stephenson sebey9   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: for()
Reply #3 - Mar 31st, 2009, 11:31am
 
At first using agents for some tasks can seem counter-intuitive as there are containers we want to see and others that are back-of-house code and which we'd like out of sight on our main views. One way to achieve such a split do this is to make a second top-level container (I normally call mine 'UTILITY') and use that to keep 'out of sight' stuff like such agents, prototypes, templates, etc.  It's all still there but if you use you main view to look the the content of the primary root (note with outline order #1) then you won't se the UTILITY container and its contents.
Back to top
 
« Last Edit: Mar 31st, 2009, 11:34am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print