State Restoration with NSDocument architecture

2014-05-24 Thread John Pannell
Hi all- I’m working on a document-based app and making every effort to adopt the behaviors of a modern app. This includes state restoration, described in the current documentation at:

Re: State Restoration with NSDocument architecture

2014-05-24 Thread Keary Suska
On May 24, 2014, at 6:44 AM, John Pannell wrote: I’m working on a document-based app and making every effort to adopt the behaviors of a modern app. This includes state restoration, described in the current documentation at:

Unwanted Animations

2014-05-24 Thread Gordon Apple
Two separate issues: 1. CALayer Animation. I have a movie sublayer which has an observer to track an underlying draw object¹s bounds. When dragging the object, the movie layer position lags. I¹ve tried ³removeAnimationForKey:@²position², and ³removeAllAnimations² when creating the layer. I¹ve

Re: Unwanted Animations

2014-05-24 Thread David Duncan
On May 24, 2014, at 10:02 AM, Gordon Apple g...@ed4u.com wrote: Two separate issues: 1. CALayer Animation. I have a movie sublayer which has an observer to track an underlying draw object¹s bounds. When dragging the object, the movie layer position lags. I¹ve tried

Re: State Restoration with NSDocument architecture

2014-05-24 Thread John Pannell
Hi Keary - I knew it was going to be something like this… :-) On May 24, 2014, at 8:58 AM, Keary Suska cocoa-...@esoteritech.com wrote: Lastly, although it may be obvious, the restore windows system setting must be turned on, or you have to use the option-quit method. Indeed - the setting

Understanding ARC

2014-05-24 Thread Jamie Ojomoh
Dear Sir, I'm trying to teach myself Objective C and I don't understand ARC very well. Please could someone help me. If I've understood this correctly (silly example): -(NSString*)stringdoodad { NSMutableString* returnString = [[NSMutableString alloc] init]; @autoreleasepool {

Re: Understanding ARC

2014-05-24 Thread Jim Geist
The compiler handles the case of a returned object properly. Ownership in the form of one reference will pass, in your example, from returnString to testString due to the assignment to the return value. testString will be released when the block it’s in exits, and since there are no more

Re: Understanding ARC

2014-05-24 Thread Jens Alfke
On May 24, 2014, at 2:34 PM, Jamie Ojomoh jamie.ojo...@gmail.com wrote: In the example, everything inside the autoreleasepool block will be released as soon as the block ends, so it's necessary to declare the return value outside the block. No, in general ARC understands that the return

string literals and performance

2014-05-24 Thread 2551
Are there any performance implications that would suggest preferring one or the other of these different styles? NSString *s = @sing me a song; [myClass aMethod: s]; and [myClass aMethod: @sing me a song]; I have a lot of the first kind in my code, and I'm thinking of simplifying it by

Re: string literals and performance

2014-05-24 Thread Stephen J. Butler
You misunderstand the point of the Stackoverflow answer. In the first example you've given it looks like s is just a stack local variable. In that case there is no difference between the two examples. Actually, in the face of optimization I bet the assembly turns out exactly the same. Use the

Re: string literals and performance

2014-05-24 Thread Quincey Morris
On May 24, 2014, at 21:08 , 2551 2551p...@gmail.com wrote: Are there any performance implications that would suggest preferring one or the other of these different styles? NSString *s = @sing me a song; [myClass aMethod: s]; and [myClass aMethod: @sing me a song”]; Basically — if