Re: Re : Re: Saving while opening with NSDocument

2014-03-24 Thread Kyle Sluder
On Mar 24, 2014, at 10:05 AM, Colas B wrote: > > Finally, I put the "saveDocument" in the "NIBDidLoad" method, with an > "afterDelay:0". I was reluctant to use this "afterDelay:0" (I wish there were > a method called "performOnNextRunLoop"). This smells like a hack !!! > It was easier to call t

Re: Re : Re: Saving while opening with NSDocument

2014-03-24 Thread Alto Test1
Call me on my mobile. From: colasj...@yahoo.fr To: quinceymor...@rivergatesoftware.com To: cocoa-dev@lists.apple.com Sent: Mon, Mar 24, 2014 Subject: Re: Re : Re: Saving while opening with NSDocument Finally, I put the "saveDocument" in the "NIBDidLoad" method, with an &

Re: Re : Re: Saving while opening with NSDocument

2014-03-24 Thread Colas B
answer. If it can help, I can tell that I also tried to put the 'saveDocument:' in the 'didLoadNIb' (without the 'afterDelay') and it also create deadlock. From: Quincey Morris ; To: Colas B ; Cc: cocoa-dev@lists.apple.com ; Sub

Re : Re: Saving while opening with NSDocument

2014-03-19 Thread Colas B
Thanks for this very complete answer.If it can help, I can tell that I also tried to put the 'saveDocument:' in the 'didLoadNIb' (without the 'afterDelay') and it also create deadlock. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: Saving while opening with NSDocument

2014-03-19 Thread Quincey Morris
On Mar 19, 2014, at 14:10 , Colas B wrote: > I will try with 'withDelay:0' and will let you know if it works. If you have > a link for information on runloops (what is it, how it works, etc.), I am > interested. You can get information on run loops here: https://developer.apple.com/l

Re : Re: Saving while opening with NSDocument

2014-03-19 Thread Colas B
I agree with you that the best place for this is NSDocumentController.I will try with 'withDelay:0' and will let you know if it works. If you have a link for information on runloops (what is it, how it works, etc.), I am interested.Thanks for your interest and your help.Colashttps://overview.ma

Re: Saving while opening with NSDocument

2014-03-19 Thread Kyle Sluder
On Mar 19, 2014, at 10:11 AM, Quincey Morris wrote: > >> On Mar 19, 2014, at 09:52 , Kyle Sluder wrote: >> >> This doesn’t sound like a good idea to me. There is no guarantee that >> opening an NSDocument will cause it to create an interface—see AppleScript, >> printing from the Finder’s con

Re: Saving while opening with NSDocument

2014-03-19 Thread Quincey Morris
On Mar 19, 2014, at 09:52 , Kyle Sluder wrote: > This doesn’t sound like a good idea to me. There is no guarantee that opening > an NSDocument will cause it to create an interface—see AppleScript, printing > from the Finder’s contextual menu, etc. Perhaps so, but it seems to me that there’s ev

Re: Saving while opening with NSDocument

2014-03-19 Thread Kyle Sluder
> On Mar 19, 2014, at 9:43 AM, Quincey Morris > wrote: > >> On Mar 19, 2014, at 04:30 , Colas B wrote: >> >> I will look in the direction of ‘performSelector’ if (when) I want to save >> these initial data repairings. Another possible issue might be that the >> delay is not long enough and t

Re: Saving while opening with NSDocument

2014-03-19 Thread Quincey Morris
On Mar 19, 2014, at 04:30 , Colas B wrote: > I will look in the direction of ‘performSelector’ if (when) I want to save > these initial data repairings. Another possible issue might be that the delay > is not long enough and the `saveDocument:` creates a deadlock. This is an > unlikely situati

Re: Saving while opening with NSDocument

2014-03-19 Thread Colas B
Thanks Quincey for your answer. For now, I chose the solution of not saving after these changes. I will look in the direction of ‘performSelector’ if (when) I want to save these initial data repairings. Another possible issue might be that the delay is not long enough and the `saveDocument:` cr

Re: Saving while opening with NSDocument

2014-03-18 Thread Quincey Morris
On Mar 11, 2014, at 10:24 , Colas B wrote: > I would like to perform `saveDocument:` in the process of opening a document > (I call this method in `- (id)initWithContentsOfURL:ofType:error:`. > > It does not work because of a deadlock. Yes, you can’t really expect to use the NSDocument subclas

Saving while opening with NSDocument

2014-03-17 Thread Colas B
Hi (this is my first email on the Apple mailing list) ;-) I would like to perform `saveDocument:` in the process of opening a document (I call this method in `- (id)initWithContentsOfURL:ofType:error:`. It does not work because of a deadlock. I would like to know if you have any idea about that