Re: Change NSCursor globally

2017-02-15 Thread Colas B
Hi Uli, thanks for your answer.I want to do the former: when the user enables a mode in the application, the cursor changes, exactly in the way you described (the shape changes). The user should be able to use this custom cursor over a PDFView, a UIScrollView, etc. However, I need the cursor onl

Setting the contentOffset of a UICollectionView during update

2015-10-18 Thread Colas B
I have a collection view, with a custom layout, whose layout is changing when one taps on a cell: the cell becomes bigger. The layout is not a sublass of UIViewCollectionViewFlowLayout but directly of UICollectionViewLayout. I update the layout with [self.collectionView performBatchUpdates:      

Parent/child view controllers: when shall we use it?

2015-04-30 Thread Colas B
Dear cocoa-dev, When building a simple UIViewController, do I have to use  addChildViewController: if this VC "owns" other VCs?(By simple VC, I mean I am not creating MyCustomNavigationController or something like that; just a "plain old" VC) Imagine for example that I build a view controller (My

Serious bug for UICollectionView

2014-11-07 Thread Colas B
Dear cocoa-dev, I am facing the following bug with `UICollectionView` in the **horizontal scrolling mode** (`iOS 8`, `iOS 7`, the only ones I have tested). I would like to have your views on this bug and on how I could elegantly fix it (and possibly fix it so that when Apple fixes it, my fix wo

Advice for an hazardous bug with nested contexts in core data

2014-07-09 Thread Colas B
Dear cocoa-dev, Running on iPad simulator 6.1, I have a hazardous bug when using core data. The bug occurs 1 time over 5 approximately when I try to fetch data. The problem comes from my configuration of the core data stack with nested contexts. Indeed, when I remove the parent context and work

Re : Re: cocoapods: Problem with loading nib for a NSWindowController

2014-04-19 Thread Colas B
Hi and thanks for your answers.It was a problem with cocoapods. I don't know why but even after reinstalling, the script "add Pods resources" was not in the build phases.I added it manually, and now it works. ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: NSTask: how to launch a binary as if I launched it via terminal?

2014-04-14 Thread Colas B
OK. But without the simple quotes, it also fails. With the quotes, the error is /bin/bash: pico /Users/colas/myfile.txt: No such file or directory Without the quotes, the error is Error opening terminal: unknown. Thanks! Le Lundi 14 avril 2014 16h19, Jerry Krinock a écrit : From documentation

NSTask: how to launch a binary as if I launched it via terminal?

2014-04-14 Thread Colas B
Dear cocoa-dev, I am would like to launch a binary as if I launched it via terminal. I tried the following but it is not working.      NSTask * myTask = [[NSTask alloc] init];     NSArray * arguments = @[@"-c", @"-l", @"'/usr/bin/pico /Users/colas/myfile.txt'"];     [myTask setCurrentDirecto

Re : Re: NSTask: program launching another program, potential problem with path: how to do?

2014-04-10 Thread Colas B
No, it is "Mach-O 64-bit executable" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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

Re : Re: NSTask: program launching another program, potential problem with path: how to do?

2014-04-10 Thread Colas B
I am not an unix-ey guy... I don't specify explicitly a bash when I run my program (with NSTask) : I just give the path to the program. If I discover the path to the shell being used, does it mean that what used to be the path of my NSTask will become an argument?About path and environment var

Re: NSTask: program launching another program, potential problem with path: how to do?

2014-04-10 Thread Colas B
Hi,  thanks for your answers ! Your idea sounds good. What can I do if I want both shells invoked from programs and login shells to have the same initialization script? Shall I write a new script that runs first ~/.login and then myprogram ? Or is there a simplier way? In my case, myprogram is

NSTask: program launching another program, potential problem with path: how to do?

2014-04-10 Thread Colas B
Dear cocoa-dev, I want to do with an `NSTask` what I am able to do in the terminal via     $ myprogram myfile.ext I know that `myprogram` (I don't have any control on this program) launches another program `myauxprogram`. Furthermore, the path to `myprogram` is `path1` and the path to `myprogr

Re : Re: Removing a file via NSFileWrapper

2014-03-31 Thread Colas B
Thanks for your help.I guess encountering such situations is part of the job... And I'm still learning it ;-)Colashttps://overview.mail.yahoo.com?.src=iOS";>Envoyé depuis Yahoo Mail pour iPad ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
“Desktop” because a file with the same name already exists." UserInfo=0x61069c80 {NSFilePath=/Users/colas/Desktop/folderName, NSUnderlyingError=0x61041e60 "The operation couldn’t be completed. File exists"}". Le Dimanche 30 mars 2014 23h58, Quincey Morris a écrit :

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
       d) this time, if I check again the content of myFolder.myApp, I don't see "file2" (but "file1" is still there) > > >What does “check again” mean? Did you close the window showing the contents of >myFolder.myApp, then open another one? Yes, it is what I mean. I don’t understand this. ‘NS

Re: Removing a file via NSFileWrapper

2014-03-30 Thread Colas B
ntion that. I think I am going to manage the contents of the attached files without NSFileWrapper. Thanks Colas Le Samedi 29 mars 2014 17h51, Mike Abdullah a écrit : On 29 Mar 2014, at 16:43, Colas B wrote: > Dear cocoa-dev, > > There is a problem when I try to remove a file from a

Removing a file via NSFileWrapper

2014-03-29 Thread Colas B
Dear cocoa-dev, There is a problem when I try to remove a file from a folder via NSFileWrapper. I don't know if this is an important info, but the folder is inside a "package" (a folder with an extension). I have a folder "(...)/attached_files" on my disk. I create a NSFileWrapper with  self.fi

Re : Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-03-26 Thread Colas B
What is the difference between writing a hard link and just ignore this particular file that has not changed ? If the file is already there, where the hard link will be created?https://overview.mail.yahoo.com?.src=iOS";>Envoyé depuis Yahoo Mail pour iPad _

Re : Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-03-26 Thread Colas B
Yes indeed, I'm using this method to manage additional data in a document.Want you say Mike frightens me a little bit, I would not want all my memory used my extra files when I save the document.Which options should I use if I want the file wrapper to read/write as less as possible when I updat

Write with NSFileWrapper vs. copy with NSFileManager

2014-03-25 Thread Colas B
Hi, I am having troubles using NSFileWrapper. In order to have a better understanding of it, I would like to ask you the following question. Is there a difference between     NSURL *referenceURL, *destinationURL ;          [[[NSFileManager alloc] init] copyItemAtURL:referenceURL                

Re: Re : Re: Saving while opening with NSDocument

2014-03-24 Thread Colas B
uot;saveDocument" than to subclass NSDocumentController, and result is safer I think. I don't have to deal with the case where no nib is loaded. It works well. Thanks to all for their help. Colas Le Mercredi 19 mars 2014 23h14, Colas B a écrit : Thanks for this very complete

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 : 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 Colas B
:` creates a deadlock. This is an unlikely situation if the delay is 10 seconds. Is there a way to detect when we are in such a situation? Le Mardi 18 mars 2014 8h07, Quincey Morris a écrit : On Mar 11, 2014, at 10:24 , Colas B wrote: I would like to perform `saveDocument:` in the process

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