Attempts to use tokenat on a Dictionary via the "For each key" event doesn't work with the dictionary.CurrentValue when I populate the Dictionary with a JSON string from a remote PHP file (via AJAX). Confirmed the code is working if I load the data from a local TXT file, loading the data from a remote PHP file don't work though.
(Related thread: https://www.scirra.com/forum/how-do-i-use-tokenat-on-dictionaries_t184524)
Attach a Capx
Description of Capx
1) AJAX request to a remote PHP file to get JSON formatted output of a MySQL database.
2) Load the JSON string into a Dictionary object.
3) Loop each Dictionary key and append the 2nd token from the CurrentValue of each key to a Text object.
Steps to Reproduce Bug
- Open the capx file and watch the output (no manual steps required).
Loops each key and outputs "Hello " but does not output the 2nd token like it's supposed to.
Output should be "Hello <name>" 5 times.
- Chrome: YES
- FireFox: UNKNOWN (Not Installed)
- Internet Explorer: YES
- Edge: YES
- Midori: YES
Operating System and Service Pack
Windows 10 Pro 64bit
Construct 2 Version ID
Tested in both r239 stable and r240 beta