panel:compareFilename:with:caseSensitive:
Controls the ordering of files presented by the NSSavePanel object specified.
Declaration
- (NSComparisonResult) panel:(id) sender compareFilename:(NSString *) name1 with:(NSString *) name2 caseSensitive:(BOOL) caseSensitive;Parameters
Return Value
One of the following:
Discussion
NSOrderedAscendingiffileName1should precedefileName2NSOrderedSameif the two names are equivalentNSOrderedDescendingiffileName2should precedefileName1
Discussion
Don’t reorder filenames in the Save panel without good reason, because it may confuse the user to have files in one Save panel or Open panel ordered differently than those in other such panels or in the Finder. The default behavior of Save and Open panels is to order files as they appear in the Finder. Note also that by implementing this method you will reduce the operating performance of the panel.