Does the Search field in the standard Open dialogue actually work ? It appears to do nothing compared to what the same thing does in the Finder. I have assumed that it can be a predefined feature that would be universal to work without any coding, but I may be wrong. Any insights?
Yes, it works here.
Yup, works fine. I use it when Xojo loses some files and I donât remember where I put my classes.
Do you mean in the IDE or from your app?
From within the app. Tried something very simple like a file on the desktop. No luck fining it, whereas the normal search thing in the Finder did find it.
Maybe your spotlight is broken?
Any messages in Console.app when using this dialog?
Then the finder shouldnât find it either.
Sorry, not on my Mac till tomorrow. Have you tried in a little demo? Did you set any file filters?
yes as Markus said it could be a file filter
you have a filter from your app, and the finder does not have one.
Never mind. Embarrassingly enough, it was a simple typo in the File Types names causing the blindness. Thanks anyway for your support!
Good to know, and thanks for sharing, so if others run into this situation, there is something for them to check.
What was the issue?
I have exactly this problem and no idea how to âfixâ it.
If I save a file called mything.xyz and a picture called mything.jpg in the same folder
Search will show mything.jpg but mything.xyz is missing or greyed out
Empty the search field and mything.xyz appears and is selectable
Im using this code:
Dim dlg as new OpenDialogmbs
Dim xsc As New OpenDialogFileTypeMBS
xsc.name = "Charts"
xsc.Extension = "*.chart;*.cht;*.border;*.motif;*.pat;*.oxs"
dlg.AddType xsc
dim xspics as new OpenDialogFileTypeMBS
xspics.name = "Pictures"
xspics.Extension = "*.png;*.jpg;*.gif;*.tiff;*.jpeg;*.bmp;*.pdf"
dlg.AddType xspics
dlg.ShowDialog
As far as I can recall, the GetOpenFolderItem(âsomethingâ) did not quite match what it read in the file types definition, so it effectively looked for something not existing. Computers, as you know, do what you tell them to do, not what you in you mind intended to do. Took a while to spot the difference, especially after having starred at it for quite a while. Sigh !
More testing:
If I use a file open dialog from Text Edit, typing something in the search DOES turn up my files.
If I do the same search in the same place, using the file open dialog generated by the code above, it doesnt work.
Is this maybe an MBS issue? @Christian_Schmitz
Addendum:
If I switch back from OpenDialogmbs
and use Xojoâs OpenDialog then the search field does work.
So there is a difference in OpenDialogMBS
I moved to OpenDialogMBS to avoid some bug in OpenDialog which I cant immediately recall, so I dont really want to revert at this point. Just want to know if there is some setting or fix I may have missed.
Perhaps Xojo uses NSOpenPanel and MBS does not?