Re: Getting notification when Facetime call comes in

2021-08-24 Thread Alex Zavatone via Cocoa-dev
Why not build your own test bed for the notifications that come in and decide which ones you want to respond to? Cheers, Alex Zavatone > On Aug 24, 2021, at 10:52 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Thanks a lot for your response! > >> Not sure if that work, but at least, you

Re: Getting notification when Facetime call comes in

2021-08-24 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! > Not sure if that work, but at least, you should try to use the right > Notification Center. > NSWorkspace Notification Center is only used to broadcast NSWorkspace > notifications. I tried it , but it did not work either. > >

Re: Getting notification when Facetime call comes in

2021-08-24 Thread Jean-Daniel via Cocoa-dev
Not sure if that work, but at least, you should try to use the right Notification Center. NSWorkspace Notification Center is only used to broadcast NSWorkspace notifications. https://developer.apple.com/documentation/avfaudio/avaudiosession/responding_to_audio_session_interruptions

Getting notification when Facetime call comes in

2021-08-23 Thread Gabriel Zachmann via Cocoa-dev
In my macOS app, I'd like to get notified if and when a FaceTime call comes in. I thought I could get these notifications with code like this: - (void) applicationDidFinishLaunching: (NSNotification *) aNotification { NSNotificationCenter *nc = [[NSWorkspace sharedWorkspace]

Re: Getting rid of "cannot check for malicious software"

2020-03-05 Thread St John, David R via Cocoa-dev
:05 AM To: cocoa-dev@lists.apple.com Subject: Getting rid of "cannot check for malicious software" When installing my screensaver (i.e., downloading and double-clicking), some people get a funny warning saying "cannot check for malicious software". In my Xcode project, I

Re: Getting rid of "cannot check for malicious software"

2020-03-05 Thread Steve Mills via Cocoa-dev
On Mar 5, 2020, at 08:05:13, Gabriel Zachmann via Cocoa-dev wrote: > > When installing my screensaver (i.e., downloading and double-clicking), > some people get a funny warning saying "cannot check for malicious software". Tell users to not double-click it, but to install it manually in

Getting rid of "cannot check for malicious software"

2020-03-05 Thread Gabriel Zachmann via Cocoa-dev
When installing my screensaver (i.e., downloading and double-clicking), some people get a funny warning saying "cannot check for malicious software". In my Xcode project, I have "Automatically manage signing" switched on, with the signing certificate "Development". Is there anything I can do to

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
Sorry about the mysterious blank posts. Let's see if I can do it with plain text rather than HTML. On 4/5/2018 11:05 AM, David Duncan wrote: >> On Apr 5, 2018, at 10:53 AM, James Walker wrote: >> >> I have a generic NSView that contains some subviews, and I'd like

Re: problem getting CALayer to draw an image (repost)

2018-04-05 Thread James Walker
___ 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 Subscription:

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
___ 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 Subscription:

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
___ 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 Subscription:

Re: problem getting CALayer to draw an image

2018-04-05 Thread David Duncan
> On Apr 5, 2018, at 10:53 AM, James Walker wrote: > > I have a generic NSView that contains some subviews, and I'd like to add a > background image. I tried code like this: > > NSImage* backgroundImage = [NSImage imageNamed: @"blueprint controls.png"]; > CALayer*

Re: problem getting CALayer to draw an image

2018-04-05 Thread Rob Petrovec
If you take out the setNeedsDisplay it draws ok. —Rob > On Apr 5, 2018, at 11:53 AM, James Walker wrote: > > I have a generic NSView that contains some subviews, and I'd like to add a > background image. I tried code like this: > > NSImage* backgroundImage =

problem getting CALayer to draw an image

2018-04-05 Thread James Walker
I have a generic NSView that contains some subviews, and I'd like to add a background image. I tried code like this: NSImage* backgroundImage = [NSImage imageNamed: @"blueprint controls.png"]; CALayer* holderLayer = [CALayer layer]; _throttleHolder.layer = holderLayer;

Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Vince DeMarco
The best way would be to use vImage and make a vImage_Buffer from a CGImageRef. look at the documentation for vImageBuffer_InitWithCGImage() vImage might end up doing the image conversion you need to do as a bonus. the vImage API is kind of different, but once you figure out how to use it, you

Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Steve Christensen
On Nov 14, 2017, at 8:37 PM, Rick Mann wrote: > >> On Nov 14, 2017, at 20:18 , Jens Alfke wrote: >> >>> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: >>> >>> Maybe, at least for the bonus question. The bigger question is

Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Bill Dudney
> On Nov 14, 2017, at 8:37 PM, Rick Mann wrote: > >> I’m not super into graphics, but my gut feeling is that, if you care about >> optimization details like whether pixmaps are being copied, you should >> really be using a lower-level graphics API than UIImage, which is

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
> On Nov 14, 2017, at 20:18 , Jens Alfke wrote: > > > >> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: >> >> Maybe, at least for the bonus question. The bigger question is around the >> copy. > > Where pixmaps live is a pretty complex issue —

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Quincey Morris
On Nov 14, 2017, at 20:11 , Rick Mann wrote: > > The bigger question is around the copy. In general, the answer must be that a copy ought to be expected. That’s because a data provider is not required to have a data buffer, so there’s not necessarily any underlying data

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Jens Alfke
> On Nov 14, 2017, at 8:11 PM, Rick Mann wrote: > > Maybe, at least for the bonus question. The bigger question is around the > copy. Where pixmaps live is a pretty complex issue — ideally they live in the GPU’s address space as textures so they can be blitted

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
> On Nov 14, 2017, at 20:07 , Quincey Morris > wrote: > > On Nov 14, 2017, at 18:36 , Rick Mann wrote: >> >> Is there a way to get at the underlying raw image data for a given UIImage >> (in an immutable buffer) in Swift? >> >>

Re: Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Quincey Morris
(resent to the list) On Nov 14, 2017, at 18:36 , Rick Mann > wrote: > > Is there a way to get at the underlying raw image data for a given UIImage > (in an immutable buffer) in Swift? > > Does this end up making copies? (For bonus points,

Getting immutable UIImage data pointer without copy?

2017-11-14 Thread Rick Mann
Is there a way to get at the underlying raw image data for a given UIImage (in an immutable buffer) in Swift? Does this end up making copies? (For bonus points, what's the array magic?) let img: UIImage = UIImage(named: "MyImage") let data: CFData? = img.CGImage.dataProvider.data let dataArray:

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-17 Thread Sean McBride
helpful! I know I've read it before, but forgot to recheck those release notes, they sure are great, I'm glad Apple writes them! I also found 'QA1509: Getting the pixel data from a CGImage object' which is even older, but was useful too. I also found vImageBuffer_InitWithCGImage() which has bee

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Jens Alfke
> On Aug 16, 2017, at 4:29 PM, Sean McBride wrote: > > Right, but then I'm back where I started. :( Because there's (apparently) no > way to ensure that the NSBitmapImageRep I get is in a particular format, and > I absolutely need 8 bit per pixel & greyscale. I

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Ken Thomases
On Aug 16, 2017, at 6:29 PM, Sean McBride wrote: > > > Right, but then I'm back where I started. :( Because there's (apparently) no > way to ensure that the NSBitmapImageRep I get is in a particular format, and > I absolutely need 8 bit per pixel & greyscale. It's

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-16 Thread Sean McBride
tmapImageRep can be created from a CIImage, and has methods for >creating an NSData version of the bitmap, or just getting the bitmapData >and/or data planes. Right, but then I'm back where I started. :( Because there's (apparently) no way to ensure that the NSBitmapImageRep I get is in a

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Sean McBride
On Tue, 15 Aug 2017 09:41:25 -0700, Doug Hill said: >Check out CoreImage ColorControls filter, which has a Saturation parameter: Thanks Doug and Jonathan for the CIImage suggestion, I'll take a closer look. But one thing I don't see at all in CIImage.h is how to get an NSData of the pixels of

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Doug Hill
I only need > access to the raw pixels to do some custom processing on. NSBitmapImageRep can be created from a CIImage, and has methods for creating an NSData version of the bitmap, or just getting the bitmapData and/or data planes. Doug ___ C

Re: Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Doug Hill
Check out CoreImage ColorControls filter, which has a Saturation parameter: https://developer.apple.com/library/content/documentation/GraphicsImaging/Reference/CoreImageFilterReference/#//apple_ref/doc/filter/ci/CIColorControls

Decompressing JPEG data into specific format, getting raw pixels

2017-08-15 Thread Sean McBride
Hi all, I get some JPEG data from the network. I want to efficiently decompress this data into a specific format (8 bit greyscale) and have an NSData of the raw pixels. What's the best way to do this? I'm currently using NSBitmapImageRep initWithData:, then testing if the result is

Re: Getting the Version of an Application

2017-04-11 Thread Steve Mills
On Apr 11, 2017, at 08:20:53, Dave <d...@looktowindward.com> wrote: > > Is there any way of getting the version number of an Application if it is NOT > running? Sure, create an NSBundle for it and get the version the usual way. NSBundle* bun

Getting the Version of an Application

2017-04-11 Thread Dave
Hi All, This is a Mac question. Is there any way of getting the version number of an Application if it is NOT running? Thanks a lot All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Getting the true rotation of a UIView layer

2017-03-14 Thread Graham Cox
by getting values out of the transform directly as you tried, except that you really have to know your trig. The values in there (which?) represent sin and cos of the angle, so in theory using tan(x) = sin(x)/cos(x) you could get the angle that way, but I prefer to treat transforms as black boxes

Re: Getting the true rotation of a UIView layer

2017-03-14 Thread Eric E. Dolecki
Alright, I got something now that I believe works. *let transform:CATransform3D = innerRing.layer.presentation()!.transform* *let angle: CGFloat = atan2(transform.m12, transform.m11)* *var testAngle = radiansToDegress(radians: angle)* *if testAngle < 0 {* *testAngle = 360 + testAngle* *}*

Re: Getting the true rotation of a UIView layer

2017-03-14 Thread Eric E. Dolecki
I don't follow. On Tue, Mar 14, 2017 at 11:29 PM Graham Cox wrote: > Get the final transform, then use it to transform an angle of 0. The > result is the angle. > > —Graham > > > > > On 15 Mar 2017, at 2:13 PM, Eric E. Dolecki wrote: > > > > Once

Re: Getting the true rotation of a UIView layer

2017-03-14 Thread Graham Cox
Get the final transform, then use it to transform an angle of 0. The result is the angle. —Graham > On 15 Mar 2017, at 2:13 PM, Eric E. Dolecki wrote: > > Once done (I dispatch after the randomSpeed duration), I'd like to > determine the angle it's currently at. > >

Getting the true rotation of a UIView layer

2017-03-14 Thread Eric E. Dolecki
I have a view that I am rotating a lot, often more than 360 degrees (spins around a few times). Each time it stops, I want to determine the resulting "visual" angle. How do I go about doing that? rotateView is a configured CABasicAnimation: *let rotateView = CABasicAnimation()* *let randonAngle

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-15 Thread Stephane Sudre
Actually, it's to put back some of them on a newly created folder. So right now, it just retrieves the values as NSData objects but I've added a hook to be able to convert the data to the real objects. the - [NSFileManager copyItemAtPath:toPath:error:] API does copy at least the FinderInfo and

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-15 Thread Allan Odgaard
On 14 Oct 2016, at 23:33, Stephane Sudre wrote: I ended up writing a category for NSManager to deal with this using the xattr.h APIs. […] If the goal is to copy extended attributes (as one post alluded to) then there is the `COPYFILE_METADATA` flag which can be used with

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-14 Thread Stephane Sudre
I ended up writing a category for NSManager to deal with this using the xattr.h APIs. Something like: - (NSDictionary *)PKG_extendedAttributesOfItemAtPath:(NSString *)inPath error:(NSError *__autoreleasing *)outError; - (BOOL)PKG_setExtendedAttributes:(NSDictionary *)inExtendedAttributes

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-13 Thread Gary L. Wade
Write bugs for the ones where there's no non-deprecated method. I don't recall all the values, but there may be UNIX-level functions to do some things. And if there's no real way now, look up the info on the structures and set them by way of the xattr calls. -- Gary L. Wade (Sent from my iPad)

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-13 Thread Laurent Daudelin
I use the NSFileManager when accessing file’s attributes. That’s the only way I know in Cocoa. -Laurent. -- Laurent Daudelin laur...@nemesys-soft.com AIM/iChat/Skype:LaurentDaudelin

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-13 Thread Stephane Sudre
No specific attributes in the FinderInfo data. I just need to be able to get it and set it on another file/folder. The labels case you mention is an interesting one. I had not thought about it when it comes to cross-compatibility with the different OS versions I need to support. On Thu, Oct 13,

Re: Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-13 Thread Gary L. Wade
What attributes in particular do you need to work with? In case you might be dealing with labels, those moved from the simple bitmask flag to separate values in their own extended attribute. Other values may have changed similarly but I haven't kept up with them. -- Gary L. Wade (Sent from my

Getting/Setting FinderInfo attributes using native Cocoa API?

2016-10-13 Thread Stephane Sudre
Question: Is there a native Cocoa API that can replace the FSGetCatalog/FSSetCatalog API when it comes to retrieving/setting the FinderInfo (and FinderExtInfo) attributes of a file? OS X 10.8 and later. Problem: The FS CoreCarbon APIs are deprecated but apparently, there's nothing to replace

[NSXPCConnection] Getting the effective user/group ids of the listener

2016-08-14 Thread Stephane Sudre
It's possible to retrieve the effective user/group ids of the remote peer from the listener delegate method. But it there a way for the remote peer to get the effective user/group ids of the remote listener? According to the CREDENTIALS section of the xpc_objects(3) man page, it seems to be

Getting NSRulerView to show sub-integral labels?

2016-07-01 Thread Rick Mann
Is there any way to get NSRulerView to label more often than integral values? I'm trying to show longitude and latitude scales, and when you're zoomed in on a region of a few km, you may not cross an integral degree boundary. I'd like for it to show 0.1 or even 0.01 ticks. Any way to get it to

Re: On getting the wrong file type

2016-06-02 Thread Daryle Walker
I'm writing about the load- and save-NSData methods of NSDocument that are supplied when selecting a (non-Core Data) Document-based project template. Sent from my iPhone > On Jun 2, 2016, at 3:57 PM, Quincey Morris > wrote: > >> On Jun 2, 2016, at 12:26

Re: On getting the wrong file type

2016-06-02 Thread Quincey Morris
On Jun 2, 2016, at 12:26 , Daryle Walker wrote: > > The NSDocument file handler methods are passed a UTI string of the file's > (supposed) type. What error are you supposed to throw when you get an > unrecognized UTI? Or can you punt up to super for that default handling?

On getting the wrong file type

2016-06-02 Thread Daryle Walker
The NSDocument file handler methods are passed a UTI string of the file's (supposed) type. What error are you supposed to throw when you get an unrecognized UTI? Or can you punt up to super for that default handling? Sent from my iPhone ___

Re: Getting the Version Number from an NSRunningApplication?

2016-05-25 Thread Daniel Höpfl
Hi, On 2016-05-25 10:56, Dave wrote: Hi, How can I get the version number of an Application from an NSRunningApplication object? I tried the following, the BundleID looks ok but “bundleWithIdentifier:” returns nil? +(NSInteger) getAppVersionNumberWithRunningApp:(NSRunningApplication*)

Getting the Version Number from an NSRunningApplication?

2016-05-25 Thread Dave
Hi, How can I get the version number of an Application from an NSRunningApplication object? I tried the following, the BundleID looks ok but “bundleWithIdentifier:” returns nil? +(NSInteger) getAppVersionNumberWithRunningApp:(NSRunningApplication*) theRunningApp { NSString*

Re: Getting a double-click on a text label

2016-04-18 Thread Graham Cox
> On 18 Apr 2016, at 11:46 AM, Ryan Dignard > wrote: > > Would NSClickGestureRecognizer work? I've done this on iOS with the > equivalent UITapGestureRecognizer. > That worked a treat, thanks! Only available from 10.10, but I can live with that, older OS

Re: Getting a double-click on a text label

2016-04-17 Thread Ryan Dignard
Would NSClickGestureRecognizer work? I've done this on iOS with the equivalent UITapGestureRecognizer. On Sun, Apr 17, 2016 at 5:45 PM, Graham Cox wrote: > Hi al, > > Here’s something I thought would be trivial, turns out to be non-obvious. > > I have a text label

Getting a double-click on a text label

2016-04-17 Thread Graham Cox
Hi al, Here’s something I thought would be trivial, turns out to be non-obvious. I have a text label that’s not normally editable text, but it can be made editable in some circumstances. It would be useful if a double-click were a shortcut to make it editable, but I can’t see a quick way to

Re: windowDidLoad getting called twice?

2016-02-28 Thread Dave
Hi, I found the problem, it was in the Class above the one where I as looking, very confusing as the debugger is a bit glitchy in this area and wouldn’t let me Step Into/Out of properly….. Thanks for the help, All the Best Dave ___ Cocoa-dev

Re: windowDidLoad getting called twice?

2016-02-28 Thread Dave
> On 28 Feb 2016, at 17:55, Keary Suska <cocoa-...@esoteritech.com> wrote: > > >> On Feb 28, 2016, at 8:10 AM, Dave <d...@looktowindward.com> wrote: >> >> the winddowDidLoad method of my Window Controller is getting called twice. >> Is this

Re: windowDidLoad getting called twice?

2016-02-28 Thread Keary Suska
> On Feb 28, 2016, at 8:10 AM, Dave <d...@looktowindward.com> wrote: > > the winddowDidLoad method of my Window Controller is getting called twice. Is > this expected behaviour? The window is the NIB has no views setup in the > window ContentView, I add them after the

windowDidLoad getting called twice?

2016-02-28 Thread Dave
Hi, the winddowDidLoad method of my Window Controller is getting called twice. Is this expected behaviour? The window is the NIB has no views setup in the window ContentView, I add them after the window NIB has loaded. I’m guessing the second call is when I add subviews to the Content View

Re: Getting displayName out of font file

2016-02-26 Thread Gerriet M. Denkmann
> On 27 Feb 2016, at 09:54, Ken Thomases wrote: > > On Feb 26, 2016, at 7:17 AM, Gerriet M. Denkmann wrote: >> >> On 26 Feb 2016, at 17:33, Ken Thomases wrote: >>> >>> On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann

Re: Getting displayName out of font file

2016-02-26 Thread Ken Thomases
On Feb 26, 2016, at 7:17 AM, Gerriet M. Denkmann wrote: > > On 26 Feb 2016, at 17:33, Ken Thomases wrote: >> >> On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann >> wrote: >>> >>> I have a file “Some Font.ttf” and I want to

Re: Getting displayName out of font file

2016-02-26 Thread Eric Dolecki
I've used that dump fonts method before there was iosfonts.com to help. I haven't tried that in agrees but seems like it should do the trick.  Sent from Outlook on my phone. On Fri, Feb 26, 2016 at 11:23 AM -0800, "Alex Zavatone" wrote: Hopefully, one of these will

Re: Getting displayName out of font file

2016-02-26 Thread Alex Zavatone
Hopefully, one of these will help. #pragma mark - Font Util // - (void)dumpFonts { for (NSString* family in [UIFont familyNames]) { NSLog(@"Font Family = %@", family); for (NSString* name in [UIFont fontNamesForFamilyName: family]) { NSLog(@"Font Name = %@",

Re: Getting displayName out of font file

2016-02-26 Thread Alex Zavatone
I've got this somewhere for iOS, I think. Give me a sec and I'll dig it up. On Feb 26, 2016, at 5:16 AM, Gerriet M. Denkmann wrote: > I have a file “Some Font.ttf” and I want to know the displayName of this > font, which might be “Some-Font” or “Nice Font” or anything else. > Or nil if this is

Re: Getting displayName out of font file

2016-02-26 Thread Gerriet M. Denkmann
> On 27 Feb 2016, at 00:37, Alex Kac wrote: > > Are you wanting this for any arbitrary font? I believe you can “install” a > font just for your application - and then use the NSFont methods to get it. > >

Re: Getting displayName out of font file

2016-02-26 Thread Alex Kac
Are you wanting this for any arbitrary font? I believe you can “install” a font just for your application - and then use the NSFont methods to get it. http://stackoverflow.com/questions/5283572/custom-font-in-a-cocoa-application > On Feb 26, 2016, at 10:31 AM, Jens Alfke

Re: Getting displayName out of font file

2016-02-26 Thread Gerriet M. Denkmann
> On 27 Feb 2016, at 00:31, Jens Alfke wrote: > > If this functionality exists it would probably be down in the CoreText > framework. Take a look there. > > —Jens As Ken Thomases kindly told me it does exist exactly there: CTFontManagerCreateFontDescriptorsFromURL.

Re: Getting displayName out of font file

2016-02-26 Thread Jens Alfke
If this functionality exists it would probably be down in the CoreText framework. Take a look there. —Jens > On Feb 26, 2016, at 2:16 AM, Gerriet M. Denkmann wrote: > > I have a file “Some Font.ttf” and I want to know the displayName of this > font, which might be

Re: Getting displayName out of font file

2016-02-26 Thread Gerriet M. Denkmann
> On 26 Feb 2016, at 17:33, Ken Thomases wrote: > > On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann wrote: >> >> I have a file “Some Font.ttf” and I want to know the displayName of this >> font, which might be “Some-Font” or “Nice Font” or

Re: Getting displayName out of font file

2016-02-26 Thread Ken Thomases
On Feb 26, 2016, at 4:16 AM, Gerriet M. Denkmann wrote: > > I have a file “Some Font.ttf” and I want to know the displayName of this > font, which might be “Some-Font” or “Nice Font” or anything else. > Or nil if this is not a well-formatted font file. > I do NOT want to

Getting displayName out of font file

2016-02-26 Thread Gerriet M. Denkmann
I have a file “Some Font.ttf” and I want to know the displayName of this font, which might be “Some-Font” or “Nice Font” or anything else. Or nil if this is not a well-formatted font file. I do NOT want to install the font nor do anything with it. Short of reverse-engeneering the ttf format

Re: Getting key data out of the keychain

2016-01-01 Thread Andreas Mayer
Hello Marco, > Am 31.12.2015 um 19:23 schrieb Marco S Hyman : > > After much play, head scratching, and code that managed to add a bogus entry > to the keychain that couldn’t be deleted (time machine to the rescue) I came > up with one way to add an entry to the keychain and

Re: Getting key data out of the keychain

2016-01-01 Thread Chris Ridd
> On 1 Jan 2016, at 13:09, Andreas Mayer wrote: > > But I *still* don't know how to get at the key bytes of a SecKeyRef. :P Try asking on the apple-cdsa mailing list. It covers the security frameworks in OS X, including (hence the historical name) CDSA. Chris

Getting key data out of the keychain

2015-12-31 Thread Andreas Mayer
I want to encrypt something inside my OS X application: So I thought I'd store the key inside the keychain. After a *lot* of reading and tinkering I finally managed to create a new AES key and get it back out again (as a SecKeyRef). Now I want to use it with CCCrypt() That expects raw key

Re: Getting the final value from an NSSlider drag

2015-12-30 Thread Doug Hill
it's action message upon Mouse Up and sending continuous events, I get a value changed for every mouse move while the mouse is pressed. Then one more value changed when mouse up happens. However, when the mouse up happens, the value hasn’t changed, I’m just now getting the action message due to

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Doug Hill
> On Dec 29, 2015, at 2:45 PM, Ken Thomases wrote: > > On Dec 29, 2015, at 5:44 AM, Graham Cox > wrote: >> >> On 29 Dec 2015, at 7:44 PM, Roland King wrote: >>> >>> I can subclass NSSlider or

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Ken Thomases
On Dec 29, 2015, at 5:44 AM, Graham Cox wrote: > > On 29 Dec 2015, at 7:44 PM, Roland King wrote: >> >> I can subclass NSSlider or possibly NSSliderCell but that sounds like a >> whole world of pain, if I have to do that I’ll probably just put a >>

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> > If you want to know when the last value is sent during mouse tracking, set > the ‘actionOn’ property to mouse-up. > > So, something like this: > > - (void)viewDidLoad > { >[super viewDidLoad]; > >self.slider.action = @selector(valueChangedFinally:); >self.slider.target = self;

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: > > >> > > > Actually it's easy. For very similar reasons I needed the same behavior - > live update of the slider's temp value for UI elements, but only call the > final setter when the user is done. I subclassed

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
> On Dec 29, 2015, at 3:51 PM, Roland King wrote: > > >> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: >> >> >>> >> >> >> Actually it's easy. For very similar reasons I needed the same behavior - >> live update of the slider's temp value for UI

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
>> >> Never drove a slider with the keyboard before, so I added a keyDown and >> keyUp method to the mouseDown: one I posted earlier, with a bit of code to >> try and be smart about when to send updates, so you don’t get them if you’re >> just tabbing though. Seems to work well enough for

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Graham Cox
> On 30 Dec 2015, at 9:45 AM, Ken Thomases wrote: > > This gives false positives if the user simply stops moving the mouse but > doesn't release the mouse button. There's no delay you can specify that > avoids this, since there's no upper bound to how long the user can

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Uli Kusterer
> On 29 Dec 2015, at 23:45, Ken Thomases wrote: > > On Dec 29, 2015, at 5:44 AM, Graham Cox wrote: >> >> On 29 Dec 2015, at 7:44 PM, Roland King wrote: >>> >>> I can subclass NSSlider or possibly NSSliderCell but that sounds like

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Lee Ann Rucker
> On Dec 29, 2015, at 12:44 AM, Roland King wrote: > > I have some NSSliders hooked up on my UI to text fields with formatters, all > set up with bindings so that the label shows the slider value. The sliders > are continuous, looks fine, nice feedback for whoever’s driving. >

Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
I have some NSSliders hooked up on my UI to text fields with formatters, all set up with bindings so that the label shows the slider value. The sliders are continuous, looks fine, nice feedback for whoever’s driving. However I want to capture, in the app, the value of the slider only at the

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 00:44 , Roland King wrote: > > I want to capture, in the app, the value of the slider only at the end when > the mouse goes up, once Isn’t that what the NSControl property continuous==false is for? ___ Cocoa-dev

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 29 Dec 2015, at 17:40, Quincey Morris > wrote: > > On Dec 29, 2015, at 00:44 , Roland King > wrote: >> >> I want to capture, in the app, the value of the slider only at the end when >> the mouse goes up, once >

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Quincey Morris
On Dec 29, 2015, at 01:45 , Roland King wrote: > > the slider is hooked up via bindings in the UI to a label which shows the > value *as you slide it*, so it needs to be continuous for that purpose. Then > when you let go, only then do I want the final value to be delivered to

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Graham Cox
> On 29 Dec 2015, at 7:44 PM, Roland King wrote: > > I can subclass NSSlider or possibly NSSliderCell but that sounds like a whole > world of pain, if I have to do that I’ll probably just put a coalescing delay > into the whole thing which waits 1/2 second after an update

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 29 Dec 2015, at 17:54, Quincey Morris > wrote: > > On Dec 29, 2015, at 01:45 , Roland King > wrote: >> >> the slider is hooked up via bindings in the UI to a label which shows the >> value *as you slide it*, so

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Ken Thomases
ch will cause trouble and I'm looking for handholds for a suggested refactoring. I'll wait for more info before getting into the other stuff. Regards, Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Alex Hall
't related to my view. It holds my dictionary of tabs, but it also calls > the Twitter framework methods to download new tweets, it posts tweets, it > parses them for display, it replaces short URLs with expanded ones in tweet > text… I know it's not good to have all that logic in one

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Ken Thomases
On Sep 7, 2015, at 12:01 AM, Alex Hall wrote: > Next is the problem of accessing the current MyKVOCClass object from the view > controller, where my model is instantiated. I'll need a computed property for > this, which I'll call currentModelArray. This should return a

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Ken Thomases
or display, it replaces short URLs with expanded ones in tweet > text… I know it's not good to have all that logic in one place, and I was > going to refactor it soon, but as I said, I'm still getting things working > and seeing how the app--and its internals--will evolve and ne

Re: Getting started with Cocoa Bindings in My Project?

2015-09-07 Thread Alex Hall
*everything* that isn't related to my view. It holds my dictionary of tabs, but it also calls the Twitter framework methods to download new tweets, it posts tweets, it parses them for display, it replaces short URLs with expanded ones in tweet text… I know it's not good to have all that logic in o

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Alex Hall
hat. > > KVC can traverse dictionaries, basically by treating them like an object with > properties where the keys of the dictionary as the names of the properties. > It does not support the bracket syntax you tried to use and it does not > support getting the key from a subexpr

Getting a Popover's frame

2015-09-06 Thread Jonathan Hull
Hello, I have a UIPopoverPresentationController and I would like to get the popover’s frame in either window coordinates or the presenting controller’s view’s coordinates. A little background: The popover contains a custom color picker, and after it opens, several passthrough views

Re: Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Ken Thomases
that value as a key in a second key path, dataModel.myDict.. It doesn't do that. KVC can traverse dictionaries, basically by treating them like an object with properties where the keys of the dictionary as the names of the properties. It does not support the bracket syntax you tried to use a

Getting started with Cocoa Bindings in My Project?

2015-09-06 Thread Alex Hall
prettier at the same time. It hasn't worked so far. I understand the theory, I think. Where I'm getting lost is adapting what I've read to my own app. My data model is a dictionary of arrays, and the table is showing only one array at a time. I'm *not* trying to map the whole dictionary

  1   2   3   4   5   6   7   8   9   10   >