[0.9.8] .text property change isn't visible until reload.

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am

[0.9.8] .text property change isn't visible until reload.

Post by rk84 »

There is some quirkiness in textfield element. It has two string fields text and caption. Latest factorio update (0.10.0) reminded me of it, because there is some change on element.add() -method that broke my mod.

Creation of element:

Code: Select all

element.add({ type="textfield", name="test", style=style, text = "0", caption ="1" })

--element.test.caption is "1"
--element.test.text is ""
--the textfield on screen is empty
Current usage:
When user edits the textfield, the text is saved in "text" -field.
Script can read and write both fields, but only when adding value to caption -field it has visible effect on screen.

Some interesting usage.

Code: Select all

--Overwriting user inputs. Basicly "locks" textfield if used ontick.
element.test.caption = element.test.caption
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela

Factorio Staff
Factorio Staff
Posts: 8058
Joined: Wed Feb 06, 2013 12:00 am

Re: Usage of textfield -element

Post by kovarex »

Thank you for the report, it is fixed for 0.10.4 now.

Post Reply

Return to “Resolved Problems and Bugs”