OpenDialog is now weird on macOS !

Hours ago (I do not had Inernet then), I used two OpenDialog to choose a .txt file (to import data from) and a .sqlite (to write into).

Of course, I fill the Dialog properties, but at run time, on macOS, I do not saw anything that tell me I am seeking for a txt file (then a sqlite file)… I had the chance to be interrupted when I was starting the testings of the import part: when back to it minutes after, was asking myself what file I want to choose (txt or sqlite ?). So, I checked on Windows XP (only available there).

I checked on Windows XP and it seems better there (I forgot, I will check on Windows 10).

The code is in an Import / Export window utility (txt into sqlite / sqlite to txt) and is displayed by a MenuItem.

The only (bad) situation is to display a second window and use two Canvas or ImageWell buttons for OpenDialog / Drag and Drop… I do not know what.

I do not like the “Cascading Windows” to achieve a task, but when it is difficult to do otherwise…

What is your experience here, and how was your strategy to resolve that ?

PS: The Import / Export window have 2 x 5 Buttons.
5 buttons because there are 5 sqlite files and 2 x because of Import / Export.
(not talking about Cancel / OK).
That is three methods (3 db have the same TABLE contents, but <> TABLE names, the two other sqlite files have different TABLE Fields, so two different Methods)

how about showing a screenshot?

Yes, here we are (for the txt file):

The other one (for sqlite) is the same.

The only difference, for me or one of us is to search atxt file, check if one is selectable or not. If not, search a sqlite file that is selectable.

TXT files and folders are selectable.
SQLLITE files are not black.

That’s what it has looked like for a long time.
On windows the selector can have a title saying ‘Please select a text file’ of course.

Jeff: you are right, 100% right.

Unfortunately, we are Power Users, but our users may not be.

In my case, this case, they are oldsters, benevolents in a Charity association, so I must ask them the less possible / create an application that is the easier possible.

And when I have doubts using my application, I know I have more work on my plate. That is why I asked for help.

Nota: by tomorrow, I think I will know what to do if I do not get help from here first.

Now, by asking this kind of question(s), and if there is alternative, maybe, yes, maybe, in a future Xojo version (or macOS version, we can dream) we may get an easier, clearer alternative. WHo knows ?

display a small window at the top center of the screen saying “choose a txt file” or “choose a sql file”

You can have two filters and files of both types selectable.

Thanks Jean-Yves.

A crazy idea comes to my mind because I was thinking at the export code (export sqlite to txt): I may be wrong thinking when I asked to locate the .sqlite file. I know where it is and its name. So I only have to ask for a txt file.

Import - Export Window screen shot:

Nota: I designed the window yesterday. I may change the design tomorrow (after a second night).

make the import-export command in the file menu
make it enabled only if the user is allowed to import-export
then do the import-export in a menuhandler in each window (one for accueillants, one for accueilis, etc)
same for export.
more user friendly imho.

then you only have to select the text file, as the sqlite file is implicitely already opened !

Yes.

In a prior application, I have far advanced import / export, db split based on date, etc.

As far as I can tell, they never use them.

In a matter of fact, this is mostly for me (and for them, but to tell them: when you will want to trash my software and use another, you will be able to export the data and import them in the other software).

That information comes to my ears from rumors. Usually, I start a data base project by writing import / export following your advice, so If I have to modify the sqlite file design (TABLE, Fields in Records, etc.) I can trash the sqlite file, make some changes and here I am ! (instead of crying because I have to enter the data a second time as we all read from time to time in this forum).

Are you using openDialog.promptText to display a message? If not then try setting it

No. Title only, not in the example, never really explore most of the other properties !

The Apple API have changed (as wrote Jeff Tullin) long time ago.

Depending on the UI, it does not matter (too much), but in that case, I click in a button and OpenDialog is displayed two times… thus the potential trouble.

As I wrote yesterday, the solution I used is to comment the sqlite OpenDialog code because when the user click in a button, he intend to use a specific Data Base File.

Now, I will use it. Thank you all.