Re: Views without any layout constraints may clip their content or overlap other views

2019-09-26 Thread Laurent Daudelin via Cocoa-dev
Thanks, Quincy. That’s reassuring! I will trust I’m doing the right thing. -Laurent. -- Laurent Daudelin laur...@nemesys-soft.com Skype: LaurentDaudelin

Re: Views without any layout constraints may clip their content or overlap other views

2019-09-26 Thread Quincey Morris via Cocoa-dev
On Sep 26, 2019, at 10:55 , Laurent Daudelin wrote: > > I’m pretty much in the same situation. There seems to be something going on > behind the scene. I also observed that when I started adding constraints, I > would suddenly get many warnings and errors, some alluding to missing “y" >

Re: Questions regarding release

2019-09-26 Thread Glenn L. Austin via Cocoa-dev
> On Sep 26, 2019, at 9:47 AM, Gabriel Zachmann wrote: > >> >> I don’t believe that’s entirely true. “make” methods return a +0 value. >> >> The issue in the below code to my eye is that you allocate a path with >> CGPathCreateWithRect (+1) but then don't release it. >> > > In that case, I

Re: Questions regarding release

2019-09-26 Thread Rob Petrovec via Cocoa-dev
> On Sep 26, 2019, at 5:43 PM, James Walker via Cocoa-dev > wrote: > > On 9/26/19 4:20 PM, Gabriel Zachmann via Cocoa-dev wrote: >>> The issue in the below code to my eye is that you allocate a path with >>> CGPathCreateWithRect (+1) but then don't release it. >>> >>> In that case, I am

Re: Questions regarding release

2019-09-26 Thread James Walker via Cocoa-dev
On 9/26/19 4:20 PM, Gabriel Zachmann via Cocoa-dev wrote: The issue in the below code to my eye is that you allocate a path with CGPathCreateWithRect (+1) but then don't release it. In that case, I am wondering: doesn't ownership pass to the textlayer ? If yes, shouldn't textlayer release the

Re: Questions regarding release

2019-09-26 Thread Rob Petrovec via Cocoa-dev
> On Sep 26, 2019, at 5:20 PM, Gabriel Zachmann via Cocoa-dev > wrote: > >> The issue in the below code to my eye is that you allocate a path with >> CGPathCreateWithRect (+1) but then don't release it. >> >> In that case, I am wondering: >> doesn't ownership pass to the textlayer ? >> If

Re: Questions regarding release

2019-09-26 Thread Gabriel Zachmann via Cocoa-dev
> The issue in the below code to my eye is that you allocate a path with > CGPathCreateWithRect (+1) but then don't release it. > > In that case, I am wondering: > doesn't ownership pass to the textlayer ? > If yes, shouldn't textlayer release the path when it gets destroyed by the > ARC? > >

Re: Questions regarding release

2019-09-26 Thread John McCall via Cocoa-dev
On 26 Sep 2019, at 12:47, Gabriel Zachmann via Cocoa-dev wrote: I don’t believe that’s entirely true. “make” methods return a +0 value. The issue in the below code to my eye is that you allocate a path with CGPathCreateWithRect (+1) but then don't release it. In that case, I am wondering:

Re: Views without any layout constraints may clip their content or overlap other views

2019-09-26 Thread Laurent Daudelin via Cocoa-dev
I’m pretty much in the same situation. There seems to be something going on behind the scene. I also observed that when I started adding constraints, I would suddenly get many warnings and errors, some alluding to missing “y" location where I can clearly see one constraint addressing that “y”

Re: Views without any layout constraints may clip their content or overlap other views

2019-09-26 Thread Richard Charles via Cocoa-dev
> Excerpt from Xcode 11 release notes originally quoted by Quincey Morris. > > NSView and UIView have a layout mode option in the Size inspector to > explicitly opt into “translates autoresizing mask into constraints”. The > default setting is “Automatic”, which is the existing behavior.

Re: Questions regarding release

2019-09-26 Thread Gabriel Zachmann via Cocoa-dev
> > I don’t believe that’s entirely true. “make” methods return a +0 value. > > The issue in the below code to my eye is that you allocate a path with > CGPathCreateWithRect (+1) but then don't release it. > In that case, I am wondering: doesn't ownership pass to the textlayer ? If yes,

Re: Questions regarding release

2019-09-26 Thread Mike Abdullah via Cocoa-dev
I don’t believe that’s entirely true. “make” methods return a +0 value. The issue in the below code to my eye is that you allocate a path with CGPathCreateWithRect (+1) but then don't release it. Mike. > On 26 Sep 2019, at 17:16, Glenn L. Austin via Cocoa-dev > wrote: > > The analyzer is

Re: A question in regards to AddInstanceForFactory

2019-09-26 Thread Eric Dolecki via Cocoa-dev
Mojave. Good to know though, thanks. Sent from my iPhone 11 Pro From: Gary L. Wade Sent: Thursday, September 26, 2019 11:33 AM To: Eric E. Dolecki Cc: cocoa-dev Subject: Re: A question in regards to AddInstanceForFactory Are you running on Mojave or Catalina

Re: A question in regards to AddInstanceForFactory

2019-09-26 Thread Gary L. Wade via Cocoa-dev
Are you running on Mojave or Catalina beta? I’ve found some things in some simulators work better when under Catalina beta. -- Gary L. Wade http://www.garywade.com/ > On Sep 26, 2019, at 5:37 AM, Eric E. Dolecki via Cocoa-dev > wrote: > > FYI: This only appears when running in a simulator. >

Re: Questions regarding release

2019-09-26 Thread Glenn L. Austin via Cocoa-dev
The analyzer is great at what it does but it can't be omniscient about your code. When you start a method name with "make" or "new" or "create" it assumes that you're returning a +1 value. -- Glenn L. Austin, Computer Wizard and Race Car Driver <>< > On Sep

Re: Views without any layout constraints may clip their content or overlap other views

2019-09-26 Thread Laurent Daudelin via Cocoa-dev
I just checked this Quincy. What I observe is that the top view in my windows have the setting set to “Translates autoresizing mask into constraints” but all the other subviews are set on “Automatic”. Should I leave it that way? This is an old project predating the auto-layout, by the way.

Re: Questions regarding release

2019-09-26 Thread Gabriel Zachmann via Cocoa-dev
> > The Xcode "analyze" step should check for errors of this kind. I have xcode > set to analyze on every build, since it's usually not too slow. Thanks a lot for the hint! I tried it and it works pretty well. I actually found 2 (small) leaks. There is one place in my code (different from my

Re: A question in regards to AddInstanceForFactory

2019-09-26 Thread Eric E. Dolecki via Cocoa-dev
FYI: This only appears when running in a simulator. On Thu, Sep 26, 2019 at 8:31 AM Eric E. Dolecki wrote: > I am using Xcode 11.0 (11420a), targeting iOS 13, Swift 5, and playing > back a local audio file. Seems simple enough, but I am getting a console > print: > > let path =

A question in regards to AddInstanceForFactory

2019-09-26 Thread Eric E. Dolecki via Cocoa-dev
I am using Xcode 11.0 (11420a), targeting iOS 13, Swift 5, and playing back a local audio file. Seems simple enough, but I am getting a console print: let path = Bundle.main.path(forResource: "Tchaikovsky_Rococo_Var_orch.mp3", ofType:nil)! let url = URL(fileURLWithPath: path)

Re: Questions regarding release

2019-09-26 Thread Markus Spoettl via Cocoa-dev
On 9/26/19 11:16 AM, Gabriel Zachmann via Cocoa-dev wrote: NSImage * nsImage = [[NSImage alloc] initWithSize: nsimgrep.size]; [nsImage addRepresentation: nsimgrep]; return NSImage; You probably mean to write return nsImage; Best Regards Markus --

Re: Questions regarding release

2019-09-26 Thread Gabriel Zachmann via Cocoa-dev
>> >>> Is the IOObjectRelease() right or wrong ? >> I’m not entirely sure since I can’t find the docs for >> IOServicePortFromCGDisplayID. > > Given that the code fragment shows it as a message being sent to “self”, this > looks like Gabriel’s own method. By the standard Obj-C clang

Re: Questions regarding release

2019-09-26 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response. >> Is it safe to do it after assigning the nsimage to the layer, but before >> deleting the layer? > I would think so, but it is hard to say without knowing what > convertToNSImage:withOrientation actually does under the hood. It likely > either retains