File Open Dialog no longer allowing my filetype

Suddenly, my app is unable to browse for my file extension.
They appear greyed out and unselectable.
Any idea what might have caused this?

Xojo 2017
Sierra 10.12.6

Code unchanged for years
file type defined in the app, and is filetypes.mystuff + filetypes.allfiles

it should in theory be allowing any extension , but no file can be selected

Do you have the UTI’s properly applied to the file types?

Do you clear the Xojo Cache and empty Trashes / Usual suspects (Quit / Stop Internet / Power Off / Wait a minute or two / ) ?

[quote]Do you have the UTI’s properly applied to the file types?
Quit / Stop Internet / Power Off / Wait a minute or two[/quote]
Yes to all of those.
If I remove the filetypes filter, I can select files again.
Its not (likely) a Xojo cache since this affects the previously compiled app too at the moment.
Its like the exported UTI has stopped working for OSX
Although I thought these days a file extension was enough

Does it also happen in a new project? Another user account?

Perhaps a corrupted system Launch Services database is at fault?

https://eclecticlight.co/2017/08/11/launch-services-database-problems-correcting-and-rebuilding/

Interesting. Can’t see any solution there though. There are about 14 versioned builds of the same app on my machine at the moment
Double clicking a file opens one of the compiled apps.

The problem is the OpenDialog dialog.

Using my pre-defined filetypes now allows no selection at all.
“No” filter property allows me to select anything

Creating a new filetype on the fly like this:

[code] Dim myType As New FileType
myType.Extensions = “myfileext”

dlg.Filter=myType.Extensions
//or dlg.Filter=myType

f=dlg.ShowModal
[/code]

gets me a dialog that allows any file to be selected, eg PNG files

Whenever I have FileType problems defining the FileType in code immediately before using it tends to be the fix.
FileTypes have been a mess since at least XDC 2016, in which @John McKernon had to use face to face time with the engineers to get them to understand something was wrong with it. The engineers are still adamant we’re all using FileTypes wrong.

Working, from Answers:

    dim ftFAQ as new FileType
    ftFAQ.Name = "Answers Document"
    ftFAQ.Extensions = ".faq"
    
    dim oSave as new SaveAsDialog
    oSave.Filter = ftFAQ

I’m not sure if the Name is a required property to get it to work off the top of my head, but that seems to be the biggest difference between this working chunk and what you’ve posted as not working. I hope it helps.

1 Like

I’ll give it a go, thanks Tim

A bit off topic:

Since 2013 first release, file types are broken in Xojo.

Some weeks ago, I loaded a pre Xojo project (from a compiled application works fine with drag and drop) and watched carefully how files types are there, then create a new project and write a file type using the old way.

I forgot what I’ve done * but drag and drop files started to respect the defined file type and reject by itself all others unlike what Xojo use to do. Same behavior we can have while running Windows.

  • I do not exposed here that way because of the recent changes in Xojo: File Types are really different (too different ?) from what they were previously.

Nota: I realize, each time that I test a bad behavior in a project developped with 2015r1 to know if its me or Xojo, how much work have been done in the Xojo IDE these last 3 years.

More testing:

Xojo 2017:
My Code version 12.3 that has worked for years stopped selecting specific files in the file browser
My Code version 14 - ‘next years version’ : Same

Xojo 2018:
My Code version 12.3 that has worked for years stopped selecting specific files in the file browser
My Code version 14 - ‘next years version’ : Works

ARbed reports no differences between the two projects in the Filetypes or the selection code.
Im stumped.

I dont have time for this.
Switched to OpenDialogMBS
Now it works.