Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
Tinderbox Users >> Documentation and Tutorials >> aTbRef v5.8.0 uploaded

Message started by Mark Anderson on Mar 4th, 2011, 6:27pm

Title: aTbRef v5.8.0 uploaded
Post by Mark Anderson on Mar 4th, 2011, 6:27pm

The v5.8.0 release is out.

Title: Re: aTbRef v5.8.0 uploaded
Post by Mark Anderson on 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.

Title: Re: aTbRef v5.8.0 uploaded
Post by Mark Bernstein on 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.

Title: Re: aTbRef v5.8.0 uploaded
Post by Paul Walters on 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.)

Title: Re: aTbRef v5.8.0 uploaded
Post by Mark Anderson on 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.

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.