• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSOpenPanel and new directories?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOpenPanel and new directories?


  • Subject: Re: NSOpenPanel and new directories?
  • From: Charilaos Skiadas <email@hidden>
  • Date: Wed, 30 Mar 2005 09:19:38 -0600


On Mar 30, 2005, at 3:26 AM, Jeremy Dronfield wrote:


On 30 Mar 2005, at 3:08 am, Matt Neuburg wrote:

On Tue, 29 Mar 2005 17:55:31 -0800, "David Piasecki" <email@hidden>
said:
I'm using an NSOpenPanel to open files in my application. It works
great except when I create a new directory outside of my application.
That directory is not recognized in the NSOpenPanel unless I quit and
reload my application. Is there any sort of refresh I can do on the
NSOpenPanel object so it can behave as I would expect it to?

I would like to know this too. My app opens text documents. If I save some
new text documents elsewhere while my app is open, and I come back to my app
and choose File > Open, the new text documents are not shown in the
directory where they actually are. I have to quit my app and start it up
again in order to force the File > Open dialog to refresh itself. I regard
this as a bug in Cocoa, but maybe there's a workaround and I'd like to hear
about it if there is. m.

If this is a Cocoa bug, it seems likely to be somewhere in the document-based architecture (I assume your app uses NSDocument). I make this assumption because neither TextEdit (which doesn't use NSDocument) nor my own app (ditto) suffer this problem. In both these applications, new files created as you describe show up right away in Open panels.


Hold on a second... I just tried it with Taco HTML Edit (which *does* use NSDocument, so far as I can tell), and that behaves correctly too.

So presumably not a Cocoa bug...?

Why don't we try a little experiment. This is what I do in my computer to reproduce it, and both TacoHTML and TeXShop get tricked. My app too, and that's definitely Cocoa.


1)Launch TeXShop
2)On the terminal, switch to a directory ~/temp
3)Make sure ~/temp is not open in a Finder window
4)run "touch blah.blue"
5)Open The File>Open dialog in TeXShop
In my case, at this point blah.blue is not visible.
6)With the Open dialog still open, run "touch blah2.blue" from the terminal.
Now the open dialog has been updated.
7)Close the Open dialog
8) type "rm blah2.blue"
9) Open the File>Open dialog in TeXShop again
10) blah2.blue is still there, but when you click on it, it will not load.


This looks to me like not really the proper behavior. I am guessing, if the file is created by another application, and that application is not Cocoa, or maybe not Carbon even, then the update is not done properly.

Just tried it with TextEdit too, same problem.

Regards,

-Jeremy

==============================================
SkoobySoft, home of viJournal and Skooby Renamer
email: email@hidden or visit:
<http://freespace.virgin.net/jeremy.dronfield/skoobysoft/ skoobysoft.html>
==============================================


Haris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: NSOpenPanel and new directories? (From: Matt Neuburg <email@hidden>)
 >Re: NSOpenPanel and new directories? (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: Multiple documents per window
  • Next by Date: Re: Instant smooth searching
  • Previous by thread: Re: NSOpenPanel and new directories?
  • Next by thread: Creating a Cocoa Help Book
  • Index(es):
    • Date
    • Thread