Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000221Core InformListspublic2010-07-29 08:272010-10-28 00:30
ReporterPhonatacid 
Assigned Tograham 
PrioritynormalSeverityseriousReproducibilityalways
StatusclosedResolutionfixed 
Platformx86OSMac OS XOS Version10.6
Product Version6E72 
Target VersionFixed in Version6F95 
Summary0000221: Creating lists of generic table columns is impossible
DescriptionAlthough it was possible with 5Z71, it is now impossible in 6E72:
-to create constant lists of table columns holding table columns valued by different kinds
-to put lists of table columns into global and temporary variables

Consequently, it is impossible to use the following phrase (from the extension Dynamic Tables by Jesse McGrew):

let T be a new table with columns { character, sentence } and 1 blank row;

provided that the table columns 'character' and 'sentence' refer to column holding values of different kind.
Minimal Source Text To Reproduce
"A test area"

Include Dynamic Tables by Jesse McGrew.

Table of Test
character	sentence
a man	an indexed text

Table of Test2
character name	sentence
indexed text	indexed text

When play begins:
	[let L be a list of table columns;]
	[let T be a new table with columns { character, sentence } and 1 blank row;]
	let T2 be a new table with columns { character name, sentence } and 1 blank row;

The testroom is a room.
Additional Information1. I commented out the lines that generates the two aforementioned bugs.
2. This piece of code compiles under 5Z71 (you'll need the 5Z71 version of Dynamic Tables, and you'll have to change 'table column' to 'table-column').

I'm also not sure if this is a bug or a new design orientation taken by the inform team.
TagsNo tags attached.
Effect(serious) Compiler rejects valid code
Attached Files

- Relationships

-  Notes
(0000360)
EmacsUser (manager)
2010-07-29 13:02

This code:

- - - -
"A test area"

Include Dynamic Tables by Jesse McGrew.

Table of Test
character sentence
a man an indexed text

Table of Test2
character name sentence
indexed text indexed text

When play begins:
let L be a list of indexed text valued table columns;
[let T be a new table with columns { character, sentence } and 1 blank row;]
let T2 be a new table with columns { character name, sentence } and 1 blank row;

The testroom is a room.
- - - -

works fine because L mentions the kind held by the table columns: ``list of indexed text valued table columns.'' I don't know of a fix for T though, since there's no suitable common supertype. (The silly-sounding ``value valued'' does no good here.)
(0000361)
EmacsUser (manager)
2010-07-29 13:04

Hmm. Not sure why Mantis says I changed the source code.
(0000362)
jmcgrew (administrator)
2010-07-29 13:11
edited on: 2010-07-29 13:13

I'm also not sure if this is a bug or a feature request.

You can still create lists of table columns in 6E, but they have to have more specific types like "list of numbers valued table columns". This mirrors the changes in rulebook and activity types, so it may be intentional, although it's unfortunate that more general types aren't allowed in this particular case.

(0000363)
jmcgrew (administrator)
2010-07-29 13:16

EmacsUser: That happens when the multiline fields have leading (or trailing?) blank lines in them. They get stripped out when you load the editing page, and then the fields get changed when you submit. The revision history shows that the only difference is the blank line.
(0000364)
EmacsUser (manager)
2010-07-29 13:31

I can confirm the reported behavior in any case, so I've changed the issue status and added the word ``generic'' to the title.

Also, thanks for the Mantis explanation.
(0000578)
graham (administrator)
2010-09-22 14:15

"Fixed" is not quite accurate, as it is indeed now considered type-unsafe to make lists of table columns of different kinds, but I've rewritten the problem message thus:

Problem. You wrote 'let X be a list of table columns': but this isn't a definite kind, and is instead a general description which might apply to many different kinds, so I can't see how to create this named value. (For example, 'let R be a relation' is vague because it doesn't make clear what R will relate - 'let R be a relation of numbers' would be fine.)

- Issue History
Date Modified Username Field Change
2010-07-29 08:27 Phonatacid New Issue
2010-07-29 13:02 EmacsUser Note Added: 0000360
2010-07-29 13:02 EmacsUser Severity mild => critical
2010-07-29 13:02 EmacsUser Steps to Reproduce Updated View Revisions
2010-07-29 13:04 EmacsUser Note Added: 0000361
2010-07-29 13:11 jmcgrew Effect (critical) Inform 6 compiler reports errors for valid code => (serious) Compiler rejects valid code
2010-07-29 13:11 jmcgrew Note Added: 0000362
2010-07-29 13:11 jmcgrew Severity critical => serious
2010-07-29 13:11 jmcgrew Status new => acknowledged
2010-07-29 13:13 jmcgrew Note Edited: 0000362 View Revisions
2010-07-29 13:16 jmcgrew Note Added: 0000363
2010-07-29 13:31 EmacsUser Note Added: 0000364
2010-07-29 13:31 EmacsUser Status acknowledged => confirmed
2010-07-29 13:31 EmacsUser Summary Creating lists of table columns is impossible => Creating lists of generic table columns is impossible
2010-09-22 14:15 graham Note Added: 0000578
2010-09-22 14:15 graham Status confirmed => resolved
2010-09-22 14:15 graham Resolution open => fixed
2010-09-22 14:15 graham Assigned To => graham
2010-10-25 21:14 jmcgrew Fixed in Version => 6F95
2010-10-28 00:30 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker