Strange exception in user_prop_add_enum

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Message
Author
SimPassion
Posts: 5339
Joined: Thu Jul 27, 2017 12:22 am

Re: Strange exception in user_prop_add_enum

#11 Post by SimPassion »

Ralph wrote: Thu May 04, 2023 2:28 pmFixed, thanks!
👍
Just a small point, as also mentioned, shouldn't "is location" also modified to "is located"
"is location" doesn't seems to translate nicely in this context, at least from English to French 🤔

User avatar
Keith Baxter
Posts: 4685
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Strange exception in user_prop_add_enum

#12 Post by Keith Baxter »

Hi,


Well it seems that there is an issue. Note the default value
ice_screenshot_20230504-165228.png
Also the example I talked to ^ also now does not work. Worked before on AM4.2 beta13 ...Strange.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Sling
Posts: 5239
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Strange exception in user_prop_add_enum

#13 Post by Sling »

Keith/WillemijnL

It may be a timing thing which is why you saw it work once. I guess if the data set is very small and it reads it almost instantly then perhaps that's enough to make it work. Thinking about this a bit more perhaps delaying the code execution after the data read but before trying to add the user property may work. I've never tried it. Yes yes i know that's not an ideal solution or even desirable but it would only be once on the initial load. It's worth a try.

User avatar
Sling
Posts: 5239
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Strange exception in user_prop_add_enum

#14 Post by Sling »

SimPassion wrote: Thu May 04, 2023 2:52 pm
Ralph wrote: Thu May 04, 2023 2:28 pmFixed, thanks!
👍
Just a small point, as also mentioned, shouldn't "is location" also modified to "is located"
"is location" doesn't seems to translate nicely in this context, at least from English to French 🤔
Indeed it should be "is located".

User avatar
WillemijnL
Posts: 107
Joined: Sat Jan 30, 2016 1:14 pm

Re: Strange exception in user_prop_add_enum

#15 Post by WillemijnL »

Sling wrote: Thu May 04, 2023 11:19 pm Keith/WillemijnL

It may be a timing thing which is why you saw it work once. I guess if the data set is very small and it reads it almost instantly then perhaps that's enough to make it work. Thinking about this a bit more perhaps delaying the code execution after the data read but before trying to add the user property may work. I've never tried it. Yes yes i know that's not an ideal solution or even desirable but it would only be once on the initial load. It's worth a try.
You're right, it's a timing problem. I did other tries with data load, but none worked if you want to use the data to create a user property. Delaying is a tricky one so I decided not to try that. I have solved it by moving the data to a library file, which now looks like json, so not a big difference. The library file is processed before the main script, so the data is available before the user property is created and can be changed without changing the main code. It's ok this way.

Thanks all.

Post Reply