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
aTbRef v5.8.0 uploaded (Read 6181 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
aTbRef v5.8.0 uploaded
Mar 04th, 2011, 6:27pm
 
The v5.8.0 release is out.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: aTbRef v5.8.0 uploaded
Reply #1 - Mar 6th, 2011, 10:36am
 
Found and fixed a few glitches in the uploaded pages, if you've downloaded the TBX version since release you might want to grab a fresh copy.

Deprecation. The deprecations of old code forms are mine, and not Eastgate's, although the choices arise from much discussion in beta testing. The aim is primarily to help newer users and those with less experience of 'code' to help them make sensible choices, especially where tow or more syntaxes approaches might actually work. As many older code examples online use syntax now replaced by newer forms, I think it also helps to have a reference showing what it out of date and requiring update for ongoing use.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: aTbRef v5.8.0 uploaded
Reply #2 - Mar 6th, 2011, 3:45pm
 
About deprecated syntax....

In most or all cases, we may well accept old and deprecated syntax for a long time. There's no urgent need to switch.

But the new formers are clearer and simpler, and they're much easier to understand. So, learning the new forms and changing old actions to new will make it easier for you to understand your current work when you return to it in the future.

Some things should be fixed right away.  

* Tinderbox used to accept unquoted string constants; that was a bad idea. Quote your strings.

* Use "$" in attribute references: "$Color", not "Color".

* The new syntax $Text.contains(pattern) is so much better than the old Text(pattern) that switching promptly is a very good idea.
Back to top
 
 
WWW   IP Logged
Paul Walters
Full Member
*
Offline



Posts: 267

Re: aTbRef v5.8.0 uploaded
Reply #3 - Mar 7th, 2011, 5:29am
 
@Mark B:  your point on things that "should be fixed right away" is well taken.  Do you have any guidance for locating and "fixing" such things in legacy (pre-5.8) documents?

(Not to squat on Mark A's thread.  This discussion probably belongs over in the Q&A department.)
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: aTbRef v5.8.0 uploaded
Reply #4 - Mar 7th, 2011, 9:36am
 
@Paul, I was pondering on that just this morning and thinking of adding some notes to aTbRef o this scrore. Make some agents....

OnAdd code. Query:  $OnAdd   (IOW has a value!)
Rules. Query:  $Rule
Agents. Query:  $AgentQuery

That's most action code covered. If you're doing more advanced stuff like storing code in attributes (or $Test of other notes) then query accordingly. Check any stamps or macros too.

# query codes  Really old but they should get swept up as part of the

Export code. Check your templates, whether internal or external. Remember you may  - depending on personal style - have inline export codes in your $Text. Also export codes can use macros.

I think that covers finding stuff.  As to the actual updating, it does mean a little reading of the codes, which is why I've jumped the gun a bit on flagging deprecations.  I hope I've linked old/new pairings, and I'm happy to get input if I've missed any. I suspect there are also a few edge cases to run to ground where a new code may not full mirror the old. For instance, I've deprecated ^paragraphs^, but perhaps wrongly so as the export form allows application of a specified export template which can't (I think) be replicated via ^value(String.paragraphs())^. so a few wrinkles to work out.

The new $Attr.contains() gets rid of all the "do I use a $ prefix" anxiety.  The other confusion is the = vs. == issues. A rule of thumb: if you see '=' in a query, if conditional, or other conditional statement likely it should be '=='.

Side note.  Re .contains(). If you don't want to messa around with case sensitivity and write your queries dierectly into the query code box, consider .icontains() instead.
Back to top
 
 

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