• 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: Document can't be deleted after opening and closing it
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document can't be deleted after opening and closing it


  • Subject: Re: Document can't be deleted after opening and closing it
  • From: Chris Cockcroft <email@hidden>
  • Date: Fri, 24 Jun 2005 08:52:21 -0300


On 24-Jun-05, at 8:41 AM, Matt Gough wrote:


On 24 Jun 2005, at 11:55, Matt Gough wrote:


I recently noticed that if I open any of our documents and then close it without saving and then put that document in the Trash and try and empty the trash that the Finder says that the Trash can't be emptied because the document is busy.

Even quitting our app doesn't help the situation.

FYI:

This is on 10.4.1. I have no idea if it happened previously. I guess not since I am sure I would have noticed it by now.

We are overriding -(BOOL) [NSDocument readFromFile:(NSString *) fileName ofType:(NSString *)aType];

but in the case in point, we just end up calling [super readFromFile:fileName ofType:aType];

Our - (BOOL)loadDataRepresentation:(NSData *)data ofType: (NSString *)aType

ends up using a KeyedUnarchiver on the Data.

I have used fs_usage to see if all the opens are matched with a close and they do seem to be.

Has anyone got any ideas as to why this could happen.





As a bit of further info, lsof does not list the file as being open. Am going to dig out a 10.3.x system and see if it still goes wrong...



No, on 10.3.5 everything seems OK.

More info. It seems as though the problem rectifies itself after an unknown of time. i.e A colleague was able to empty the Trash this morning, even though he was unable to yesterday afternoon.

Although this looks like it is not obviously our fault, I find it weird that I have been unable to reproduce this behaviour with any other apps.

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


This email sent to email@hidden


I've been having issues with untrashable files in 10.4.1, as well. In particular, I've been having a hard time deleting disk images made in iDVD after playing them in DVD Player. I have to - at the very least - log out before I can trash them.


(By the way - this is my first reply to this list - hope I did it right :)

Chris Cockcroft
--------------------------------------
Chris Cockcroft Illustration
www.chriscockcroft.com
_______________________________________________
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: 
 >Document can't be deleted after opening and closing it (From: Matt Gough <email@hidden>)
 >Re: Document can't be deleted after opening and closing it (From: Matt Gough <email@hidden>)
 >Re: Document can't be deleted after opening and closing it (From: Matt Gough <email@hidden>)

  • Prev by Date: Re: Document can't be deleted after opening and closing it
  • Next by Date: Re: Core Data Multiple User question
  • Previous by thread: Re: Document can't be deleted after opening and closing it
  • Next by thread: Core Data Multiple User question
  • Index(es):
    • Date
    • Thread