09-22-2018 21:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-22-2018 21:35
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have an app with a settings page that should respond to settings changes made in the companion index.js. This works on the sim and Android, but not on Windows.
companion/index.js includes this:
settingsStorage.onchange = evt => { let textInput = JSON.parse(evt.newValue).name; let show = textInput!==""; settingsStorage.setItem('show',show); settingsStorage.setItem('status', JSON.stringify({'name':textInput})); };
settings/index.jsx:
function mySettings(props) { return ( <Page> <TextInput label="Text Input" settingsKey="textInput" /> { JSON.parse(props.settings.show || 'false') && <Text>Thank you!</Text> } <TextInput label="Your text:" placeholder="Ready." settingsKey="status" disabled="true" /> </Page> ); } registerSettingsPage(mySettings);
Entering 'xxxx' on Android gives the expected result:
However, on Windows, index.jsx doesn't react:
Am I doing something wrong? Or is there a bug in the Windows app?
Gondwana Software

09-28-2018 14:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-28-2018 14:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I would greatly appreciate it if someone could verify whether this is a system bug, or just me. I'm loathe to release further apps that use dynamic settings if they don't work on Windows. I suspect that my apps aren't the only ones affected.
Gondwana Software

