It will just be simpler if Seamly and any other apps just export / import csv as UTF-8. Besides the csv export, and now the import are supposed to save to the settings the last used seperator & codec… it’s not saving either, and the Codec drop down is always defaulting to “system”… and I don’t feel like wasting time to make it work. So I can just remove the drop downs from the dialogs and delete some more code. Yay!
I think that this is rather a big task for now, because it will mean that all the translations that you did so beautifully will also need to be redone.
I think that we should just remove the comma option in the import/export. Excell doesn’t work nicely with the comma delimited, anyway, it prefers the tab option.
I haven’t tried the Tab yet… only problem there I can see is if you edit the CSV in a text editor it may convert the tab to spaces, which would cause an even bigger mess. Also I just checked, while you can’t use the TAB in a formula, you can add a description to a custom measurement using the TAB. I suppose I could prevent the use of the TAB key in all SeamlyMe fields. In any case that’s why I’m doing the Import Dialog with a preview so you can see how it’s going to import.
Why? If you can use the TAB in the Descriptions field we have the same issue as the commas in the Fullname field and that means you can’t rely on using the TAB as a seperator for export / import.
That’s a different question. Some people may have computers setup so that TAB doesn’t switch to the next field, in which case a TAB-space could be input on the line, which would break a TAB-delimited spreadsheet. So Douglas is contemplating preventing that edge-case from being an issue. Though I suppose it might be possible that he could break being able to TAB-navigate.
That has nothing to do with entering a TAB into the text of a field. Once you click into a text field and it has focus - and if TAB is a valid char like in the case of the description of a custom measurement - it means you can enter a TAB into the decription text. Which renders the TAB useless as a CSV seperator.
Here I clicked on the Description box and pressed TAB twice… look where the cursor is:
In the case of clicking on the Name box - where TAB is NOT a valid char - typing and pressing TAB will take you to the next field… Full Name.
The TAB order is something that is defined for a form in Creator. Here you can see part of that TAB order for SeamlyMe:
Now that I’m looking at the TAB order, I would change the order, or change the focus of the FX button to No Focus so that in an Individual measurement it would skip from Formula to Description when TAB’ing.
Oh, I’ve tried using the tab here, but it doesn’t line up the columns nicely, so you can take it out of there. I use the space to tabulate the columns when I need to
I think, if necessary, you may change the order, but I don’t think it should be changed to “No Focus”.
For 1, I don’t think Seamly is an app likely to be used by the blind. Secondly there’s no reason to TAB to the fx button. It has no text or action to focus on. It’s not a textbox, and it’s not a Text button like OK, SAVE, or CANCEL, where if you TAB to it and hit ENTER it performs the action tied to the button. TAB’ing to the fx button and pressing ENTER currently has no effect. It only gets in the way of data entry. If the focus hint is changed to No Focus, it will be removed from the TAB order list, and TAB’ing will skip from Formula to Description.
That being said… We now have a working CSV Import. At least in English.
I also added the Vertical Bar and the EM Dash as separator options.
You create a new individual or multisize file… then import your CSV, which then populates the form. Currently I have it checking if the “Name” is a valid known measurement or begins with ‘@’, and is not empty. I need to add some additional checks, like is the CSV for an individual or multisize, as well as dealing with a CSV that contains translated Names, and if the CSV contains the “”<-- CSV created with SeamlyMe…" on the 1st line and the table header names on the 2nd. A bonus would be to have it auto-detect the type of seperator. and map the columns in the proper order if for some reason a user switched them around - which would also require checking if each header name is correct.
Or if you simply try to load any random CSV file. Could add a check to make sure every table header name exists in the CSV, but it might be overkill?
Import also removes any duplicate measurements.
Note: Even though the “Formula” column is hidden and not used in Multisize measurements, it’s still part of the Table widget and gets exported and imported to and from an CSV. It needs to remain or it breaks the column count Whatever data is in that column’s cells is ignored.
What default export / import folder path would you like to see? Should we use an existing path? Or create a new path for CSV’s? Don’t forget we can export the Custom Variables as CSV so it’s not just measurements.
And yes… I can already hear the voices - “Can we add importing Custom Variables?”.