Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug Report: .isValueError=True does not "stick", but only in the handler for it

Message 1 of 2
159 Views, 1 Reply

Bug Report: .isValueError=True does not "stick", but only in the handler for it

Hi guys - I found another internal code mishap related to the API.


Setting .isValueError = True ( and un-setting it with .isValueError = False) works perfectly (changes the user input to Red or Black) -EXCEPT for the one time when we actually need it, which is inside InputChangedEventHandler, and only when the event relates specifically to the object we're trying to flag as an error.


Example - here is what setting my nickname.isValueError = True  does, inside the InputChangedEventHandler, when the user has typed in that box:-  (it should not be black)

Screen Shot 2020-05-03 at 7.08.30 pm.png


However, when the InputChangedEventHandler event is called for any other reason *besides* a change to the nickname,my nickname.isValueError = True correctly does this (red, since I do not allow spaces)

Screen Shot 2020-05-03 at 7.09.25 pm.png

Any other event, and any InputChangedEventHandler event for any other object, and it all works perfectly.


Somewhere inside your code after it has called my InputChangedEventHandler - it is clobbering something that is breaking the display of the red for the specific object it was just called for.  Basically - it should stay red when we set that flag (so the user knows immediately that they made a mistake) - your code shouldn't be un-setting it on us I expect?


This might be tricky to debug without writing a test case for it - let me know if you would like me to do that, so you can easily look for the problem.


The screecast is a demo.  when I click my strut icon (which generates an InputChangedEventHandler for an object that is not the nickname) you can see it works OK for the first time.

Message 2 of 2
in reply to: OceanHydroAU

I noticed an additional bit of info about this bug.


If there is a way to select a point, and you do select o ne, then the bug goes away (all works fine at all times).


The "refusal to stick" only happens, when no points have been selected yet.



Screen Shot 2020-05-06 at 8.55.46 pm.png    Screen Shot 2020-05-06 at 8.56.13 pm.png


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th

Autodesk Design & Make Report