This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

document["key"]


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 Document   [operators of similar scope]

 Document configuration   [other Document configuration operators]

 9.0.0

 9.2.0


document

document[key]

returns a dictionary of useful properties of the current document. The properties of the document are exposed this way:

The values for the above properties can be accessed individually by supplying the relevant key. Quotes around the key are optional, both forms are illustrated below:

$MyURL = document["url"]; 

$MyFile = document[path]; 

$MyString = document[name]; 

$MyList = document[user-attributes]; 

$MyList = document[link-types]; 

All properties return a string value but the are more usable when passed to attributes (or variables) of the precise data types shown.

Calling document with no other handling, returns the entire, unformatted Dictionary contents. To split the items onto separate lines as discrete key:value pairs:

$MyString = document.format("\n"); 

To get the three values (without their keys) on separate lines:

$MyString = document.format("\n").replace("\n[^:]+:","\n").replace("^[^:]+:",""); 

However, a neater and more easily understood method is use the Dictionary.keys method and iterate thus:

	$MyString =;
	document.keys.each[aKey]{
		$MyString = $MyString + document[aKey] + "\n";
	};