When trying to construcy a list froma selector I use the following code:
tgb.selector(value=”{countries}”, lov=”{all_countries}”, multiple=True,dropdown=True)
where ‘countries’ is an empty list and ‘all_countries’ is a list of strings. When I select a string from the UI the ‘value’ parameter is not updated and the following error is generated:
C:Usersjonesanaconda3-2023-07-2envstaipyLibsite-packagestaipyguigui.py:652: TaipyGuiWarning:
Decoding Message has failed: {‘type’: ‘U’, ‘name’: ‘_TpLv_tpec_TpExPr_countries_TPMDL_1’, ‘payload’: {‘value’: [‘Albania’, ‘Andorra’], ‘relvar’: ‘_TpL_tpec_TpExPr_all_countries_TPMDL_1’}, ‘propagate’: True, ‘client_id’: ‘20240528121739720774-0.8906308715474047’, ‘ack_id’: ’52aa4075-8cd6-4c65-81ed-66412e5a95d3′, ‘module_context’: ‘main‘}:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I’ve tried adding an ‘on_change’ function in the hope that I could catch the new value that way but this is not called either.