Open pitch-circle opened 9 months ago
Thanks for the feedback.
I agree camel case would be a better suggestion. I would need to re-examine the code. From memory I think it simply replaces the spaces with underscores in the algorithm. If the user has entered a space as the trailing character, perhaps while in the process of entering the property name, then we don't know yet which letter comes next, if any, so even if I rework the code there would still be those cases where the underscore would be suggested. I am not able to make any code changes at this time, but I will keep this suggestion in mind.
Keeping the expected format might require adding another row to the dialog. It's already quite tall. I would have to look at that as a possibility. Not everyone has the same amount of screen real estate.
I don't know of such a reference for property formats. There is a forum dedicated to the wiki. You can ask there and also get wiki editing permission for yourself.
For a real number between zero and six you would use minimum = 0, max = 6, and a preferred initial value. The step size only affects the scroll wheel or clicking the up/down arrows auto increment size. You can always manually enter any arbitrary value no matter the step size. It would be nice if the scroll wheel function was more dynamic, example to automatically increment the current precision, but that is probably a Qt limitation. E.g. if the value is 1.234, then scrolling up would give 1.235. Keep in mind OCCT functions are limited to a precision of 1e-7.
This section of the Wiki discusses naming conventions for custom properties:
https://wiki.freecad.org/Property_editor#Scripting
When you name a property in DD workbench, it suggests using underscores, which slightly conflicts with the above:
"Properties follow the CapitalCamelCase or PascalCase convention, meaning that each word starts with a capital letter, and there are no underscores. When the property editor displays such names, it leaves a space between each capital letter, making it easier to read."
When you insert, for instance, an IntegerConstraint, the Workbench initially tells you the format expected in the Value input box (initial, min,max, step) but as soon as you start typing, that disappears and you get the 'Cannot evaluate' in red above the input box.
It would be great if the expected format could persist in the red text until the dialogue is closed. In particular, I often forget which separator (comma or semicolon) should be used and when things should be quoted or not (strings/enumerations).
Would you happen to know if there is a list anywhere of the expected format for every possible property? There seem to be some gaps in the scope of Properties: length is a zero or greater float, but with a unit. I cannot see any way of having a zero or greater unitless number. Similarly, with FloatConstraint, I have to enter a step size. What if I want any real number between zero and six?
I guess this is more an issue for the general FC forum, but it would be good to know the complete details of what is currently available before trying to suggest changes or enhancements.