URL:
<http://savannah.gnu.org/bugs/?25363>
Summary: NSOpenPanel's delegate method
panel:shouldShowFilename: is called too often
Project: GNUstep
Submitted by: theeggcamefirst
Submitted on: Mon 19 Jan 2009 10:21:33 PM GMT
Category: Gui/AppKit
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
The NSOpenPanel (and NSSavePanel) delegate method panel:shouldShowFilename:
is incorrectly called with subpaths as well as the final path. Cocoa doesn't
do this.
For example, if I set the default directory to /path/to/some/folder, it seems
that the delegate method gets called with "/", "/path", "/path/to", and
"/path/to/some" as well as "/path/to/some/folder". I want to restrict use of
the open panel to only allow opening files within that particular folder and
its subfolders, so my implementation of this method (which worked under Cocoa)
rejected paths that didn't begin with /path/to/some/folder. With GNUstep's
behavior, my implementation is called first with "/" and rejects it, so the
user isn't able to select anything.
Note: I had a hard time verifying *exactly* what Cocoa does, but it calls
this method very seldom, and GS calls it a *lot*.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25363>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep