Skip to reading
Panels, Tabs & List Boxes

The important source-copy rule

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

Add, Delete, Modify and Clear operate on the list widget. For a manual list that is straightforward. For an Array or inventory source, the first item action creates a local copy of the current rows and starts using it instead of the live source.

Source table from The important source-copy rule, page 39
Before an item actionAfter an item action
Array list reads clue_rows.It displays its local rows; later clue_rows changes no longer replace them.
Inventory list reads carried items.It displays a local copy; item actions do not change actual carried quantities.
Source updates drive the view.You must manage the copied view deliberately.

Figure 33. A source-copy test: the local extra row remains after the source Array was replaced.

Hiding and showing the GUI does not reset this copy. Changing the source setting on the existing widget is not a dependable reset either. A fresh game run creates fresh widgets from authored data.

For a live journal, change the Array with Set Variable. For carried items, change the actual inventory. Use list-item actions for manual lists or a deliberately independent view.

This rule also applies to Modify Item → selected. It is not limited to adding or deleting rows.

Page 39 of 50Permalink
Go to page