|May 24, 2009, 03:23 AM||#1|
Check NSOpenPanel selection before openSheetDidEnd
I have an image viewer that opens directories and loads the pictures contained in them. What I'd like to do is check the contents of the directory for the presence of pictures, BEFORE the openSheetDidEnd selector is called, show the user an alert if the directory doesn't contain any images and have the user pick another directory.
How can I achieve this?
Thanks in advance for any advice!
|May 24, 2009, 10:46 PM||#2|
Setup a delegate on the open panel and implement panel:isValidFilename: - this will get called when the Open button is clicked. You can then return NO to force the user to select another file/folder.
|May 25, 2009, 04:41 AM||#3|
And there I was trying to subclass NSOpenPanel.. It wasn't working out
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|How to check log files to date/time system RAM was changed? Any way to check this?||asterix2k10||OS X||1||Mar 7, 2014 08:19 PM|
|Selection problems||robo44||iMac||3||Jan 31, 2014 06:07 AM|
|Resolved: NSOpenPanel Problem||larswik||Mac Programming||1||Dec 17, 2012 10:25 PM|
|The I may go to bed, and just check back in tomorrow to check my order status thread||lsutigerfan1976||iPhone||0||Sep 14, 2012 10:50 PM|
|Check List++ (World most intuitive and fastest check list) - Free App||appinitpro||iPhone and iPod touch Apps||5||Jun 15, 2012 11:31 PM|
All times are GMT -5. The time now is 04:16 AM.