Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000329Core InformPropertiespublic2010-10-10 15:432010-10-28 00:31
Assigned Tograham 
Platformx86OSMac OS XOS Version10.6
Product Version6E72 
Target VersionFixed in Version6F95 
Summary0000329: Indexed text properties of objects created by tables do not work properly
DescriptionThe sample code should replace the first character of the indexed text property of the Foo_1 object with a slash. But when the object is created from a table, character-based operations on the indexed text property fail (silently).

Affects Z-code and Glulx equally.

Minimal Source Text To Reproduce
Test is a room.

A foo is a kind of thing. A foo has an indexed text called the text-handle.

Some foos are defined by the Table of Text-Bearing Objects.

Table of text-bearing objects
foo	text-handle
Foo_1	"Text_A"

[Foo_1 is a foo. The text-handle is "Text_A".]

When play begins:
	replace character number 1 in the text-handle of Foo_1 with "/";
		say "[Foo_1]: [text-handle of Foo_1]."
Additional InformationReplace the table definition with the standard definition (commented out) and the example works as intended.

(I was surprised that there was no category for reporting issues with indexed text, so I filed this under Properties.)

TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
EmacsUser (manager)
2010-10-10 15:58

Putting ``(indexed text)'' after ``text-handle'' is a workaround; I suspect that this is a special case of 0000250.
EmacsUser (manager)
2010-10-11 09:48

No, actually I'm wrong about that. The kind ``indexed text'' in ``A foo has an indexed text called the text-handle'' is ignored in favor of the kind inferred from the table. Similarly, if one writes,

A foo has a number called the text-handle. Bar is a foo. The text-handle of bar is 1.

This error appears:

Problem. In the sentence 'The text-handle of bar is 1' , it looks as if you intend 'The text-handle of bar is 1' to be asserting something, but that tries to set the value of the 'text-handle' property to a number - which must be wrong because this property has to be a text.
graham (administrator)
2010-10-12 10:15

It was indeed the more serious problem that the property's original kind was thrown away in favour of the kind observed in the column (which of course is in many cases the same, which is why this bug hasn't shown up before); this is now fixed.

- Issue History
Date Modified Username Field Change
2010-10-10 15:43 ektemple New Issue
2010-10-10 15:55 graham Assigned To => graham
2010-10-10 15:55 graham Status new => confirmed
2010-10-10 15:58 EmacsUser Note Added: 0000689
2010-10-11 09:48 EmacsUser Note Added: 0000691
2010-10-12 10:15 graham Note Added: 0000694
2010-10-12 10:15 graham Status confirmed => resolved
2010-10-12 10:15 graham Resolution open => fixed
2010-10-25 21:14 jmcgrew Fixed in Version => 6F95
2010-10-28 00:31 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker