teavm-flavour

Passing a variable to a function in a foreach loop

这一生的挚爱 提交于 2021-01-05 09:12:30
问题 I want to ask how variable in std:foreach is handled? I have this scenario that the same object is passed to a function regardless it it not the one that should be passed: <std:foreach var="property" in="properties"> <button onclick="unhide('collapse-primitive')"/> <span class="hidden" id="collapse-primitive"> <ul class=""> <li event:async-click="setItemPropertyType(property, 'String')">String</li> <li event:async-click="setItemPropertyType(property, 'Boolean')">Boolean</li> <li event:async

Passing a variable to a function in a foreach loop

感情迁移 提交于 2021-01-05 09:12:18
问题 I want to ask how variable in std:foreach is handled? I have this scenario that the same object is passed to a function regardless it it not the one that should be passed: <std:foreach var="property" in="properties"> <button onclick="unhide('collapse-primitive')"/> <span class="hidden" id="collapse-primitive"> <ul class=""> <li event:async-click="setItemPropertyType(property, 'String')">String</li> <li event:async-click="setItemPropertyType(property, 'Boolean')">Boolean</li> <li event:async