Re: Force NSOpenPanel's -panel:shouldShowFilename: to get called again?
Re: Force NSOpenPanel's -panel:shouldShowFilename: to get called again?
- Subject: Re: Force NSOpenPanel's -panel:shouldShowFilename: to get called again?
- From: John Stiles <email@hidden>
- Date: Fri, 18 Jan 2008 15:18:30 -0800
Jeez, and there it was staring me in the face the whole time.
Honestly, I am only going to call it in response to user input, so I
expect it will be good enough. Thank you so much for the pointer.
(I'll post again if it doesn't actually work ;) )
Corbin Dunn wrote:
On Jan 17, 2008, at 4:43 PM, John Stiles wrote:
In an NSOpenPanel, I want to force the open panel to re-check the
"-panel:shouldShowFilename:" status on all the visible files. (In my
accessory view, you can change options about what you want to open,
and I want the open panel to honor any changes immediately.)
I've done some Googling and some people have said that calling
"[window update]" would cause this to happen, but it doesn't seem to
be working for me in Leopard. Neither [window update] and [window
display] seem to have any visible effect.
If I go to the Finder and create a new file, this does force the Open
panel to re-check everything. And of course if I browse to a
different folder and then browse back, that also solves it. However
neither of these tricks seems to be very useful :)
Any ideas? Did this change in Leopard or is there some trick I'm
missing?
Yes, call -validateVisibleColumns. It is sort of expensive, so don't
call it too frequently. If you want a cheaper version, please log a
feature request.
corbin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden