NSOpenPanel search field: some found files with allowed type are greyed

39 Views Asked by At

On MacOS 10.14 & 10.15, using a NSOpenPanel with an array of allowed file types, the content of the selected directory displays correctly all allowed-type files. But if I use the panel's search field with an allowed extension, some problems arise:
On 10.14, most of the found filenames appear greyed, despite of being selectable and openable.
On 10.15, none of the files are found...

I implemented the delegation panel:shouldEnableURL: method as:

-(BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url
{
    NSString *fileExtension = [url pathExtension];
    if ([self.allowedExtensions containsObject:fileExtension]) {
        return TRUE;
    } else {
        return FALSE;
    }
}

I checked wether the correct flag (TRUE/FALSE) is returned, so I don't understand this problem

0

There are 0 best solutions below