assert:LastPrint("some text")
I like the print options, and the idea of msg indirection is interesting. I'll have a think about this for Q5.3 (logged http://quest.codeplex.com/workitem/1122) - maybe I could include some of the code from this library?
Assertions to test the last printed string are a good idea. May be better to incorporate this into the existing assert functionality within a walkthrough (http://quest5.net/wiki/Walkthroughs#Assertions) - you can use "assert:expression", so maybe you could have
assert:LastPrint("some text")
By using the built-in walkthrough assert functionality you have the advantage that the walkthrough will stop if the assertion fails.
5. Yes I've noticed the spinner is occasionally dodgy. Can you reproduce anything consistently?
8. The best way to implement this would be to modify the Scope functions. If we can come up with some common usage patterns for this it could be turned into a Core library feature.
<function name="ToWords" parameters="number" type="string"><![CDATA[
if (not TypeOf(number) = "int") {
error ("NumberInWords can only handle ints")
}
s = ""
if (number < 0) {
s = "minus "
number = -number
}
if (number < 2000) {
hundreds = number / 100
number = number % 100
if (hundreds > 0) {
s = s + StringListItem(printer_struct.number_units, hundreds) + " hundred "
if (number > 0) {
s = s + "and "
}
}
if (number < 20) {
if (not number = 0 or s = "") {
s = s + StringListItem(printer_struct.number_units, number)
}
}
else {
units = number % 10
tens = (number / 10) % 10
s = s + StringListItem(printer_struct.number_tens, tens - 2)
if (not units = 0) {
s = s + StringListItem(printer_struct.number_units, units)
}
}
}
else {
s = ToString(number)
}
return (Trim(s))
]]></function>
<object name="number_struct">
<number_units type="list">zero;one;two;three;four;five;six;seven;eight;nine;ten;eleven;twelve;thirteen;fourteen;fifteen;sixteen;seventeen;eighteen;nineteen;twenty</number_units>
<number_tens type="list">twenty;thirty;forty;fifty;sixty;seventy;eighty;ninety</number_tens>
</object>
<function name="MoveChildObjects" parameters="from, to">
foreach (obj, GetDirectChildren (from)) {
obj.parent = to
}
</function>
System.Exception: Unknown source list for dropdown
at TextAdventures.Quest.EditorControls.DropDownControl.m_helper_Initialise()
at TextAdventures.Quest.EditorControls.ControlDataHelper`1.DoInitialise(EditorController controller, IEditorControl definition)
at TextAdventures.Quest.EditorControls.ElementEditor.InitialiseEditorControl(IEditorControl ctl)
at TextAdventures.Quest.EditorControls.ElementEditor.AddControlToGrid(Grid grid, IEditorControl ctl, Boolean firstControl)
at TextAdventures.Quest.EditorControls.ElementEditor.InitialiseTab(IEditorTab tab)
at TextAdventures.Quest.EditorControls.ElementEditor.Initialise(EditorController controller, IEditorDefinition definition)
at TextAdventures.Quest.WPFElementEditor.Initialise(EditorController controller, IEditorDefinition definition)
at TextAdventures.Quest.Editor.AddEditor(String name)
at TextAdventures.Quest.Editor.SetUpEditors()
at TextAdventures.Quest.Editor._Closure$__1._Lambda$__4()