Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Off The Wall: Feature Ideas >> IsLocal test
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1486063979

Message started by james a. foster on Feb 2nd, 2017, 2:32pm

Title: IsLocal test
Post by james a. foster on Feb 2nd, 2017, 2:32pm

It would be nice to have a test for whether an attribute is local or still inheriting values. One nice way might be a function like $ATTRIBUTE.islocal() or $ATTRIBUTE.inheritsValues().

One can currently get this information by looking at the attribute. If it's in bold then it's local. But a function like the above would make it possible to have an agent that searches for the (many) times when one accidentally makes a variable local while testing out changes to the database.

Title: Re: IsLocal test
Post by Mark Anderson on Feb 3rd, 2017, 3:54am

Generally, calling the attribute will give this state. IOW, to test if $MyString inherits for a given note, the query:

$MyString

should return all notes with a local value. However this fails if the attribute is manually set to zero (number), false (boolean), never (date) or no value (all other types). I thought the the above test did - or did used to - work for these null values. I'd agree than an unambiguous test for a local value - including a locally set default - would be useful. Visual inspection doesn't scale well.

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.