Re: Change NSCursor globally

2017-02-15 Thread Colas B
NSEvent *)event{    [self.cursorForIPhone6 set];} - (void)mouseMoved:(NSEvent *)event{    [self.cursorForIPhone6 set];} - (void)cursorUpdate:(NSEvent *)event{    [self.cursorForIPhone6 set];} Colas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Change NSCursor globally

2017-02-06 Thread Colas
to revert back to the usual behaviour. Thanks, Colas ___ 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

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:      

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

2015-05-04 Thread Colas
Thanks Roland for your answer. Sorry for the unclarity of my question. You completely answered my question. I wondered about this point because I come from the OSX development and there is not (as far as I know) this concept of child/parent. Colas Le 1 mai 2015 à 06:47, cocoa-dev-requ

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

2015-04-30 Thread Colas B
/parent mechanism is only for UINavigationController, TabBar, ... or if I want to create such a "general" class. So, am I wrong or am I right ? Thanks ;-)Colas  ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

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
currencyType] ;     theMainMOC.parentContext = theParentPrivateMOC ;               /*      Instanciation of the MOC      */     _managedObjectContext = theMainMOC ; } Thanks ! Colas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or m

Advice for error "NSBundle was released too many times"

2014-04-22 Thread Colas
is a link to a image of the stack : http://s21.postimg.org/jm03t68kn/Capture_d_cran_2014_04_21_16_08_56.png If you have any guess on what’s going on and/or any advice, THanKS ;-) !!! Colas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

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

cocoapods: Problem with loading nib for a NSWindowController

2014-04-18 Thread Colas
document ; [self setMinimalDurationTo:defaultMinimalDuration] ; } return self; } 3) My problem —> in my toy-project that uses this pod, I don’t have any problem —> in my real project, I have an error : -[MyCBDLockManager loadWindow]: failed to load window nib file 'MyC

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

2014-04-14 Thread Colas
Thanks to everyone for helping !!! Using setEnvironment made it easily. I was looking for a complicated solution when the solution was not so difficult. Le 14 avr. 2014 à 17:59, Colas a écrit : > Thanks also for the idea of -setEnvironment. I will

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

2014-04-14 Thread Colas
o invoke '>> gnuplo t .gnuplot' manually on the respective gnuplot file.. (I give the option —shell-escape to pdflatex) The error I get in xcode is [;sh: gnuplot: command not found. Thanks also for the idea of -setEnvironment. I will try. Le 14 avr. 2014 à 17:43, Bryan Vines a

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

2014-04-14 Thread Colas
much !! Le 14 avr. 2014 à 17:43, Bryan Vines a écrit : > Colas, > > If my previous code snippet doesn’t work with pdflatex, NSTask has a > -setEnvironment method; it may allow you to set your task’s environment > variables. > > — > Bryan Vines > > > On Apr 14

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

2014-04-14 Thread Colas
Le 14 avr. 2014 à 17:07, Bryan Vines a écrit : > Hi Colas, > > Pico is an interactive text editor. I don’t think NSTask is going to give you > much opportunity to interact with it. Are you using Pico as an example, or > are you actually trying to launch Pico? > > If yo

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

2014-04-14 Thread Colas
> Try putting > > /usr/bin/pico /Users/colas/myfile.txt > > into separate items in the argument NSArray. I find the man page ambiguous, > and I lack direct experience, but that may be what bash expects. > > It is not working, unfortunately. > I can’t guarant

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

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/col

Re: Write with NSFileWrapper vs. copy with NSFileManager

2014-04-12 Thread Colas
I keep the information of what needs to be saved in MyAssistanForSaving and when it is time to save (in my case I always save immediately when one attaches new files), I write in my file package with the help of NSFileManager in the -writeToURL... Method (I don't remember the précis name right n

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
is pdflatex (with the -shell-escape option) and myauxprogram is gnuplot. Colas Le Jeudi 10 avril 2014 16h32, Jens Alfke a écrit : On Apr 10, 2014, at 6:23 AM, Keary Suska wrote: This is more likely a shell scripting issue, rather than am NSTask issue, unless sandboxing is somehow

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

2014-04-10 Thread Colas B
ments];           [myTask launch] ; I get the following error `sh: myauxprogam: command not found` If I create a symbol link in `path1` to `myauxprogram`, the problem is the same. How is it that when I execute the program in a terminal, everything goes well but via NSTask it fails? How can I solve thi

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
and removing). 4) I checked also with the options, and only the NSFileWrapperWritingAtomic  option allows me to "update" a folder "linked" with a NSFileWrapper via the "write..." method. Do you understand this ? The document of  NSFileWrapperWritingAtomic does not me

Removing a file via NSFileWrapper

2014-03-29 Thread Colas B
pplication does not exist". If anyone has a good experience with NSFileWrapper, more information about the options of the writeToUrl:... command would be appreciated. Indeed, if I don't use the "NSFileWrapperWritingAtomic", I have an error : &q

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
on the values of options; what would be the best choice for options here?)? Again, I ask this question in order to understand better NSFileWrapper. I see that I have the choice in my code to use one or the other. I guess the answer might involve considerations about "hard links".  Tha

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
e deadlock. PPS: Why do I want to do that? When a document is opened, sometimes some corrupted data needs to be fixed. I do it, but I want to save these fixes. So that the user won't remark anything. PPS: My document handles "additionalData" (file wrapper), but this should not chang