Page 6 of 10

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Mon Nov 08, 2021 10:10 pm
by jonasb
When looking at the PR's description, this sounds pretty powerful indeed. Somewhat dangerously, but especially useful to reference user-input from a parent container. However, I find the name "hidden reference", or "HIDDENREF(..)" a bit strange. Can we still brainstorm on the name a bit before merging? What do you think about "unsafe(..)"?

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Tue Nov 09, 2021 12:06 pm
by adrianinsaval
unsafe is too ambiguous, hiddenref is more descriptive. If we want to more actively warn users of the danger expressions that use this function could have a different coloring like orange instead of blue with a tooltip to explain why

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Tue Nov 09, 2021 5:18 pm
by jonasb
Maybe "unchecked(..)"? that would describe more that the check for cyclic dependencies is not performed here. Personally, I find "hiddenref(..)" completely unspecific. Sure, it may make sense for the developer who implement it, but not for the user. I'd prefer a user-centric naming.

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Fri Nov 12, 2021 12:59 am
by realthunder
There is another PR of mine improving the expression completer, which is going to address the concerns here. The completer will provide descriptions of the function just like Python console. It will also warn user about cyclic reference in red.
Screenshot from 2021-11-12 08-16-46.png
Screenshot from 2021-11-12 08-16-46.png (27.71 KiB) Viewed 8355 times
chennes wrote: Mon Nov 08, 2021 2:26 pm I'm working my way through merging this PR
I don't have problem using a new name of the function, but can we at least keep the old name for migration purpose? There are already people using my branch with this function. We can add deprecation notes in the tooltip, once the completer PR is there.

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Sun Nov 14, 2021 12:04 am
by chennes
realthunder wrote: Fri Nov 12, 2021 12:59 am can we at least keep the old name for migration purpose?
That seems reasonable. I'll merge it as it is now and you can submit a PR that is just the addition of the "legacy" name, that way it's easy to track down and remove later on.

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Sun Nov 14, 2021 12:06 am
by chennes
jonasb wrote: Tue Nov 09, 2021 5:18 pm I'd prefer a user-centric naming.
I just wanted to say that I appreciate the feedback, and I'm not ignoring it :) -- but absent any sort of consensus on the name my inclination is to leave it as-is.

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Sun Nov 14, 2021 11:24 am
by adrianinsaval
realthunder wrote: Fri Nov 12, 2021 12:59 am I don't have problem using a new name of the function, but can we at least keep the old name for migration purpose? There are already people using my branch with this function. We can add deprecation notes in the tooltip, once the completer PR is there.
How about some code that replaces the old name for the new one? Your release was never advertised as compatible with FreeCAD master so I don't think it's too much of an issue

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Tue Nov 23, 2021 7:33 am
by BiBo
Hello.
To be honest, your job made me go back to learning FreeCAD, thanks, it's incredible.
I ask experts to explain how to work with SS Edit mode/ComboBox? I feel this is an incredibly useful feature (something like LOOKUP) but can't get this set up to work.
The functionality of synchronizing SS data with SQL databases also suggests itself, maybe someone has met or did this for sale?

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Sun Nov 28, 2021 9:05 am
by realthunder
BiBo wrote: Tue Nov 23, 2021 7:33 am I ask experts to explain how to work with SS Edit mode/ComboBox? I feel this is an incredibly useful feature (something like LOOKUP) but can't get this set up to work.
I haven't included the 'Edit mode' feature in this PR. I assume you read about in the wiki document. It's available in my branch, if you want to try. The configuration table feature in my branch will use the combo box edit mode in the spreadsheet so that you can change the configuration either in spreadsheet directly or using the configurable object property.

Here is a simple example of using the mode own your own. Just type the following expression in any cell

Code: Select all

[[<<a>>, <<b>>, <<c>>], 1]
Then right click the cell, select Edit mode -> ComboBox. Now if you edit the cell, it will show a combo box instead. If you want to always show the combobox, enable Edit mode -> Persistent.

Re: PR#2862: Configuration Table using Spreadsheet

Posted: Mon Dec 13, 2021 10:17 pm
by BiBo
realthunder wrote: Sun Nov 28, 2021 9:05 am I assume you read about in the wiki document. It's available in my branch, if you want to try.
Thank you! I have no idea how you came to this, I read it several times wiki document and every time I find something new that I missed in the previous reading. It's global!