[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
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

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

Post by rk84 » Mon Jun 16, 2014 1:40 pm

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

kovarex
Factorio Staff
Factorio Staff
Posts: 7424
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Usage of textfield -element

Post by kovarex » Wed Jul 23, 2014 11:04 am

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

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: Google [Bot]