Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Quincey Morris
On Apr 21, 2014, at 18:28 , Kyle Sluder wrote: > Why not? Let’s assume for the sake of an example, the toolbar is 40 points high, and the OpenGL view (its visible rect, at least) is 200 points high. According to Eric, when the cursor is 40 points *above* the bottom of the view, where.y is 200

Re: ARC Retain Cycles

2014-04-21 Thread Roland King
There you go. 16683382 On 22 Apr, 2014, at 2:55 am, Greg Parker wrote: > On Apr 20, 2014, at 3:40 PM, Roland King wrote: >> If however one of A or B happens to be KVO'ing the other, which happens a >> lot in my code, I use KVO everywhere, Leaks doesn't find the cycle. That's >> wrong, KVO doe

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Ken Thomases
On Apr 21, 2014, at 8:28 PM, Kyle Sluder wrote: > On Mon, Apr 21, 2014, at 05:24 PM, Quincey Morris wrote: >> On Apr 21, 2014, at 17:15 , Eric Shepherd wrote: >> >>> I've checked -- [self bounds].origin.y is 0. >> >> That can’t be! What is ‘where.y’ at the very top of your view? Can you >> log

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Eric Shepherd
On Mon, Apr 21, 2014 at 8:24 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > That can’t be! What is ‘where.y’ at the very top of your view? Can you log > self.bounds so we can see all of it? > I've flipped my view because I'm dealing with existing code that assumes that (0,0) i

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Kyle Sluder
On Mon, Apr 21, 2014, at 05:24 PM, Quincey Morris wrote: > On Apr 21, 2014, at 17:15 , Eric Shepherd wrote: > > > I've checked -- [self bounds].origin.y is 0. > > That can’t be! What is ‘where.y’ at the very top of your view? Can you > log self.bounds so we can see all of it? Why not? If it ret

Re: Layout-triggered animation

2014-04-21 Thread Julian
Ugh, forget the youtube video, it gets too resampled. Just download the file and watch it if yyou want. https://dl.dropboxusercontent.com/u/16749188/Animation%20jitter.mov On Mon, Apr 21, 2014 at 6:15 PM, Julian wrote: > Hi Jakob, thanks for the reply. I stopped checking the list every day. >

Re: Layout-triggered animation

2014-04-21 Thread Julian
Hi Jakob, thanks for the reply. I stopped checking the list every day. Going backwards: It may be an expensive operation to remove, but these macs seem to be able to handle it. I'm not noticing any problem on my 2.4 ghz Core 2. > See also the section "Animating Changes Made by Auto Layout" on the

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Quincey Morris
On Apr 21, 2014, at 17:15 , Eric Shepherd wrote: > I've checked -- [self bounds].origin.y is 0. That can’t be! What is ‘where.y’ at the very top of your view? Can you log self.bounds so we can see all of it? Well, it can be. A couple of other possibilities: — Your view is larger than you thin

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Eric Shepherd
On Mon, Apr 21, 2014 at 7:56 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > And ‘self’ is the NSOpenGLView, yes? It sounds like your view’s bounds > origin has been moved by the height of the toolbar. Perhaps what you > *should* be logging (and using) is ‘where.y - self.bounds.

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Quincey Morris
On Apr 21, 2014, at 16:46 , Eric Shepherd wrote: > where = [self convertPoint:where fromView:nil]; // Convert to the view's > frame of reference > > NSLog(@"Mouse Y: %3.0f", where.y); And ‘self’ is the NSOpenGLView, yes? It sounds like your view’s bounds origin has been moved by the hei

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Eric Shepherd
On Mon, Apr 21, 2014 at 7:03 PM, Ken Thomases wrote: > In case you missed it, Noah Desch reported no problems using an > NSOpenGLView in a window with a toolbar. I'm pretty sure some Apple sample > projects use NSOpenGLViews in windows with toolbars, too. > Yeah, that's why I'm so confused. I'

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Eric Shepherd
I'm doing this: - (void)mouseMoved:(NSEvent *)theEvent { NSPoint where = [theEvent locationInWindow]; where = [self convertPoint:where fromView:nil]; // Convert to the view's frame of reference NSLog(@"Mouse Y: %3.0f", where.y); } And the results are as described previously. This is the

Re: NSOperation Issues

2014-04-21 Thread Varun Chandramohan
Hi Ken, You are right this is not NSOp issues as it seems to have finished. [queue waitUntilAllOperationsAreFinished]; [op isCancelled] replied with NO [op isFinished] with YES So this has to be some QCCAESPadCryptor internal error. Ill investigate this further. Thank you. Regards, Varun O

Re: ARC Retain Cycles

2014-04-21 Thread Roland King
On 22 Apr, 2014, at 3:34 am, Dave wrote: > Confusing results. > > I changed the property in question: > > @property (nonatomic,assign) id payloadObject; > Start with this - what do you want that property to be? Strong/weak/unsafe_unretained? Second - allocati

Re: NSOperation Issues

2014-04-21 Thread Ken Thomases
On Apr 21, 2014, at 5:47 PM, Varun Chandramohan wrote: >op = [[QCCAESPadCryptor alloc] initToDecryptInputData:[NSData > dataWithBytes:cyphertext_dat length:sizeof(cyphertext_dat)] > keyData:[NSData > dataWithBytes:key_dat length:sizeof(key_dat)]

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Quincey Morris
On Apr 21, 2014, at 15:23 , Eric Shepherd wrote: > I added code to dump the Y-coordinate of my mouse while I move it around in > the NSOpenGLView, and sure enough, it's reaching the value that should be the > bottom edge well above the bottom. Are you sure you’re using the correct coordinate

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Ken Thomases
On Apr 21, 2014, at 5:23 PM, Eric Shepherd wrote: > On Mon, Apr 21, 2014 at 3:43 AM, Quincey Morris > wrote: > >> … IIRC the methods that convert between a window’s >> content size and its frame size don’t take the toolbar into account, which >> means that they work with a "content size” that i

Re: ARC Retain Cycles

2014-04-21 Thread Andy Lee
On Apr 21, 2014, at 5:18 PM, Kevin Meaney wrote: > On 21 Apr 2014, at 21:09, Andy Lee wrote: >> >> The solution is to use a weak reference for one of the properties in the >> cycle. In general, if one object conceptually "owns" the other, then the >> "owning" object uses a weak reference an

Re: NSOperation Issues

2014-04-21 Thread Varun Chandramohan
Hi Ken, Sorry for opening up old thread. I noticed that the code I shared earlier has stopped working in my app. QCCAESPadCryptor * op; NSString *licenseKey = nil; NSOperationQueue *queue; op = [[QCCAESPadCryptor alloc] initToDecryptInputData:[NSData dataWithBytes:cyphertext_dat len

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Eric Shepherd
I think this is the problem. I added code to dump the Y-coordinate of my mouse while I move it around in the NSOpenGLView, and sure enough, it's reaching the value that should be the bottom edge well above the bottom. The same happens at the top, where the mouse reaches the edge of the view but the

Why does an Open dialog flash at app launch?

2014-04-21 Thread Rick Mann
My iCloud-enabled OS X app launches, then flashes an open dialog before displaying one of its own windows. This behavior started when I enabled iCloud. Any idea how to prevent it? -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail _

Re: ARC Retain Cycles

2014-04-21 Thread Kevin Meaney
On 21 Apr 2014, at 21:09, Andy Lee wrote: > > The solution is to use a weak reference for one of the properties in the > cycle. In general, if one object conceptually "owns" the other, then the > "owning" object uses a weak reference and the "owned" object uses a strong > one. For example, a

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Noah Desch
I have an NSOpenGL view in a window with a nib-based toolbar that behaves correctly, so I don't think the OpenGL machinery is completely ignorant of toolbars. Noah Desch > > That sounds correct, but IIRC the methods that convert between a window’s > content size and its frame size don’t tak

Re: ARC Retain Cycles

2014-04-21 Thread Andy Lee
On Apr 21, 2014, at 10:53 AM, Alex Zavatone wrote: > > On Apr 21, 2014, at 10:34 AM, Andy Lee wrote: > >> On Apr 21, 2014, at 8:27 AM, Dave wrote: >>> Also, when I did this, I left the property attributes as “retain” and >>> “assign”, I’m wondering if it would be better to change them to “stro

Re: ARC Retain Cycles

2014-04-21 Thread Dave
Confusing results. I changed the property in question: @property (nonatomic,assign)id payloadObject; Ran leaks again and it reported another cycle - same thing, so I fixed that one too and ran leaks again, which now shows no cycles/leaks. Before when the test f

Re: ARC Retain Cycles

2014-04-21 Thread Greg Parker
On Apr 20, 2014, at 3:40 PM, Roland King wrote: > If however one of A or B happens to be KVO'ing the other, which happens a lot > in my code, I use KVO everywhere, Leaks doesn't find the cycle. That's wrong, > KVO doesn't make a strong reference, as you can tell from the 'freed when KVO > was s

Re: SpriteKit

2014-04-21 Thread Quincey Morris
On Apr 21, 2014, at 08:13 , William Squires wrote: > Question: given an SKLabelNode (reference), is there some way to render it, > and turn the rendered image into an SKSpriteNode? I know about [SKSprite > spriteWithImageNamed:], but that takes a filename of an image in the bundle, > not an ac

Re: ARC Retain Cycles

2014-04-21 Thread Dave
On 21 Apr 2014, at 15:53, Keary Suska wrote: > On Apr 21, 2014, at 8:12 AM, Dave wrote: > >> @property (nonatomic,retain) id payloadObject; >> >> This is after I ARCed it, before that it didn’t specify it, e.g. it was >> (nonatomic). I must have made it retain whe

SpriteKit

2014-04-21 Thread William Squires
Question: given an SKLabelNode (reference), is there some way to render it, and turn the rendered image into an SKSpriteNode? I know about [SKSprite spriteWithImageNamed:], but that takes a filename of an image in the bundle, not an actual UIImage, and - since one cannot save into the bundle (at

Re: ARC Retain Cycles

2014-04-21 Thread Alex Zavatone
On Apr 21, 2014, at 10:34 AM, Andy Lee wrote: > On Apr 21, 2014, at 8:27 AM, Dave wrote: >> Also, when I did this, I left the property attributes as “retain” and >> “assign”, I’m wondering if it would be better to change them to “strong” and >> “weak” ? Although, AFAIK this shouldn’t make a di

Re: ARC Retain Cycles

2014-04-21 Thread Keary Suska
On Apr 21, 2014, at 8:12 AM, Dave wrote: > @property (nonatomic,retain) id payloadObject; > > This is after I ARCed it, before that it didn’t specify it, e.g. it was > (nonatomic). I must have made it retain when I was going through the > properties. I’m not sure w

Re: ARC Retain Cycles

2014-04-21 Thread Andy Lee
On Apr 21, 2014, at 8:27 AM, Dave wrote: > Also, when I did this, I left the property attributes as “retain” and > “assign”, I’m wondering if it would be better to change them to “strong” and > “weak” ? Although, AFAIK this shouldn’t make a difference? For object properties, "strong" is a synon

Re: ARC Retain Cycles

2014-04-21 Thread Andy Lee
On Apr 21, 2014, at 10:12 AM, Dave wrote: > There is a delegate handler which makes passing and calling simple delegates > a doddle. This was originally non ARC. > > There is a property defined: > > @property (nonatomic,retain) id payloadObject; > > This is after

Re: ARC Retain Cycles

2014-04-21 Thread Dave
Hi, Amazing! I ***think*** I’ve found it! You were right, The profiler/leaks analyzer works really well, thanks for the tips! myNetworkOperation.pResponseNetworkDelegate or the corresponding class was the culprit! There is a delegate handler which makes passing and calling simple delegates

Re: ARC Retain Cycles

2014-04-21 Thread Roland King
myDataTask has a block which retains self, and self retains myDataTask leading to a cycle, would be my first thought. If nothing else also holds onto that, you'd expect leaks to find it and give you a nice diagram showing how it all hangs together, I believe leaks tracks dispatch_* (although I'v

Re: ARC Retain Cycles

2014-04-21 Thread Dave
On 21 Apr 2014, at 12:04, Roland King wrote: > > On 21 Apr, 2014, at 6:45 pm, Dave wrote: > >> >> It does use isKindOfClass, I wasn’t trying to be 100% correct on the fluff, >> just showing giving an example of the type of thing going in in property >> assignment. >> >> I didn’t write tha

Re: ARC Retain Cycles

2014-04-21 Thread Roland King
On 21 Apr, 2014, at 6:45 pm, Dave wrote: > > It does use isKindOfClass, I wasn’t trying to be 100% correct on the fluff, > just showing giving an example of the type of thing going in in property > assignment. > > I didn’t write that part it was like that and by all account it sort of > wor

Re: ARC Retain Cycles

2014-04-21 Thread Dave
On 20 Apr 2014, at 21:32, Quincey Morris wrote: > On Apr 20, 2014, at 13:22 , Dave wrote: > >> This App was an iOS application and previously it handled manual memory >> management - mostly using autorelease. I converted it by hand (didn’t use >> the ARC coversion process). > > Ah, then i

Re: Strange toolbar/view/resize cursor interaction

2014-04-21 Thread Quincey Morris
On Apr 20, 2014, at 23:53 , Graham Cox wrote: > The toolbar view is actually added as a PEER of the window's content view, > and the content view is resized to accommodate the toolbar when it is shown > or hidden. That sounds correct, but IIRC the methods that convert between a window’s conte