On Sep 25, 2019, at 13:52 , Rob Petrovec via Cocoa-dev
wrote:
>
>> 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 G
On Sep 25, 2019, at 14:44 , Gabriel Zachmann via Cocoa-dev
wrote:
>
> I have tried to create a new scheme, then changed the Build Configuration to
> "Release".
> But in
> Build Phases ⟶ Copy Files
> it still says that the product is copied from ... build/Debug.
> (The destination is /Users/ho
> On Sep 25, 2019, at 2:52 PM, Rob Petrovec via Cocoa-dev
> wrote:
>
>> 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
I haven't released my software (screensaver) in many years,
so please bear with me, I am not up-to-date any more how this works.
I have tried to create a new scheme, then changed the Build Configuration to
"Release".
But in
Build Phases ⟶ Copy Files
it still says that the product is copied fro
On Sep 25, 2019, at 12:31 PM, Gabriel Zachmann via Cocoa-dev
wrote:
> The doc for CGImageSourceCreateImageAtIndex() that I need to release imageRef
> myself.
> Is it safe to do it after assigning the nsimage to the layer, but before
> deleting the layer?
Yes, the NSImage will retain/release
> 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 or copies it. In either case, your relea
A few years ago, I switched my code to ARC.
Now, I have this in my code:
CGImageRef imageRef = CGImageSourceCreateImageAtIndex( sourceRef, 0, NULL );
...
NSImage * nsimage = [self convertToNSImage: img withOrientation:
img_orientation];
assign nsimage to a layer
...
C
Had to override acceptsFirstMouse in NSDatePicker not NSMenuItem. Works, still
doesn’t highlight the fields when selected but works. Guess I’ll figure it out.
Would like to know what is different when run directly and when run from Xcode
though
> On Sep 24, 2019, at 1:23 PM, Mark Wade via Cocoa
I am looking for a nice, intuitive way to let users select a directory.
Right now, I have a simple TextField in my GUI that shows the current path,
and a simple Button next to it that says "Change".
When users click on it, it opens an NSOpenPanel that is runModal.
This works fine, but I am wonder
I don’t recall if the URL can be a remote URL in addition to a file URL, but
regardless, check the status of the source ref with CGImageSourceStatus first.
The index value is used for compound images like animated GIFs and PNGs.
--
Gary L. Wade
http://www.garywade.com/
> On Sep 25, 2019, at 8:10
I have this piece of code in my program:
CGImageSourceRef sourceRef = CGImageSourceCreateWithURL( (CFURLRef) url,
NULL );
if ( sourceRef == NULL )
{
... display error message 1
return;
}
CFDictionaryRef fileProps = CGImageSourceCopyPropertiesAtIndex( sourceRef
11 matches
Mail list logo