table as part of a thing?

Is it correct that a table cannot be part of a thing – as opposed to a list, which definitely can? For instance, this doesn’t compile:

Test is a room. The frob is a thing in Test. The frob has a table called Table of Baz.

Table of Baz
idx	txt
1	"txt 1"
2	"txt 2"

This however compiles fine:

Test is a room. The frob is a thing in Test. The frob has a list of texts called text-lists. Text-lists is usually {"txt 1","txt 2"}.

Why would one data structure (the list) be acceptable to add to an object but not another data structure (the table)?

The reason I ask is that I’ve got a use case where a number of objects each needs to associate with a number of different tables. That association can be managed quite well by creating a list of table names for each thing, but this doesn’t appear to scale well when the list reaches about 30 elements (i.e. table names). There is a noticeable albeit short (<1 second) delay in the response compared to other actions. Presumably this relates to the fact that dynamic lists traverse more slowly than static tables. If each thing could have a table of table names instead of a list of table names, I think all would be sweetness and light.

Is there something I’m missing here? Is there a different/better work-around? Something involving I6 perhaps? TIA.

The word you’re looking for is ‘table name.’ (I don’t know why it was necessary to call it something other than ‘table’, while this isn’t necessary with lists - but tables are odd things generally.)

A thing has a table name called current reference. The current reference of a thing is usually Table of Delightful Things. The current reference of frob is Table of Stinky Things.

Edit - I see you’re already using ‘table name’ in other contexts, so I’m not quite sure what it is you’re after. Is the deal that you want to auto-generate tables in the same way that you can auto-generate lists or things and the like?

[code]A nose is part of every person.

A person has a list of texts called hilarious retorts.[/code]
If that’s the issue, no, you can’t do that.

Aha, brilliant, and many thanks! The point of this is to get a bit meta and generate responses procedurally from state and data tables stored with each object (which may be a misguided pursuit, but that’s a different matter). Here is a sketch that works just as desired and kind of shows what I’m trying to do (for better or worse):

Test is a room. The frob is a thing in Test. The frob has a table name called ref-table. Ref-table is usually Table of Foo. The frob has a number called state. State is usually 1.

Table of Foo
table name
Table of First
Table of Second
Table of Third

Table of First
idx	txt
1	"T1 txt 1"
2	"T1 txt 2"

Table of Second
idx	txt
1	"T2 txt 1"
2	"T2 txt 2"

Table of Third
idx	txt
1	"T3 txt 1"
2	"T3 txt 2"

Instead of examining frob:
	let id be the state of frob;
	repeat through ref-table of frob:
		let tn be table name entry;
		choose the row with idx of id from tn;
		say "[txt entry][line break]";
	if state of frob is 1:
		now the state of frob is 2;
		now the state of frob is 1;
test me with "x frob/x frob/x frob";

expected output:
>test me

>[1] x frob
 T1 txt 1
 T2 txt 1
 T3 txt 1

>[2] x frob
 T1 txt 2
 T2 txt 2
 T3 txt 2

>[3] x frob
 T1 txt 1
 T2 txt 1
 T3 txt 1