Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Exporting from Tinderbox >> for()
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1238508635

Message started by Sebastian Stephenson on Mar 31st, 2009, 10:10am

Title: for()
Post by Sebastian Stephenson on 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

Title: Re: for()
Post by Mark Anderson on 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;

Title: Re: for()
Post by Sebastian Stephenson on Mar 31st, 2009, 10:44am

ok thanks

Title: Re: for()
Post by Mark Anderson on 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.

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.