Object condition of a kind of value defined in a table

This code works:

[code]An outcome is a kind of value. Some outcomes are defined by the Table of outcomes.

An outcome can be untested, possible, failed, or achieved. An outcome is usually untested.

Table of Outcomes
outcome outcome condition (outcome condition)
boring lack of results –
generic reusable event –

When play begins:
choose row 1 in Table of Outcomes;
showme outcome condition entry;
now boring lack of results is possible;
showme outcome condition entry;
now outcome condition entry is outcome condition of outcome entry;
showme outcome condition entry;

Test is a room.
[/code]

It also shows, interestingly, that a definition table dynamically reflects the properties of a value. Very cool!

Unfortunately, if I change the “–” entries to “possible,” the source no longer compiles:

Is this a bug? Or is there some reasonable explanation why it doesn’t work?

Object/value conditions are a special case, and there’s no way to refer to them as values in their own right. They can only ever be adjectives applied to the object/value.

If you want values, you need to define a kind-of-value.

(I’m not sure it’s deliberate that a definition table dynamically reflects properties of a value. It’s not true for properties of an object, and the behavior for values is linked to a known bug. It may change in future releases.)

I tried defining a value, but while this seems to work like this:

[code]Material is a kind of value. The materials are metal, ceramic, and polymer.

stiffness is a kind of value. The stiffnesses are brittle, hard, and soft.

A material has a stiffness. Metal is hard.[/code]

I can’t make it work with definition tables:

[code]
Material is a kind of value. The materials are defined by the Table of Materials.

stiffness is a kind of value. The stiffnesses are brittle, hard, and soft.

A material has a stiffness.

Table of Materials
material stiffness (stiffness)
metal hard
ceramic brittle
polymer soft[/code]

Good to know the link between tables and values is a bug. I guess I should write explicit updaters if I want to store value properties in a file.

This works (with apologies to Mr Makane):

Material is a kind of value. The materials are defined by the Table of Materials.

A stiffness is a kind of value. The stiffnesses are brittle, hard, and soft.

A material has a stiffness called the stiffy.

Table of Materials
material	stiffy (stiffness)
metal	hard
ceramic	brittle
polymer	soft

Well, it compiles, but you can no longer do this:

When play begins: showme whether or not metal is hard.

In the example where the materials were defined without a table, that was possible.

True. I sometimes define a short-but-awkward sentence verb for these situations:

The verb to feel means the stiffy property.
When play begins:
	showme whether or not metal feels hard.

But this runs into a brand-new bug! (Run-time error.) Oops. Well, it works for object properties.

That would work for conditions, but you’d have to define a new phrase for assignment:

[code]To make (stuff - a material) get (quality - a stiffness):
now the stiffy of stuff is quality.

When play begins:
make metal get hard.[/code]

I think I can avoid almost all of this, but it’s bugging me that you can do things without a table that you can’t do with a table.

No, once you’ve defined a sentence verb for a property, you can use it both for getting and setting.

now metal feels soft;
if metal feels soft: ...

(Except, again, that there’s a bug in this case – sentence verbs for properties of KOVs.)

I didn’t know that. How cool! It’s a pity about the bug…