"Computed segue" in iOS?

2015-09-04 Thread Carl Hoefs
iOS 8.4.1 I need to segue from a UITableView to different view controllers depending which element in the table is touched (some elements are videos that need to be displayed/edited, some are data files that need to be graphed, etc.). Is it possible to have a "computed segue" in iOS such that I

Re: "Computed segue" in iOS?

2015-09-07 Thread Carl Hoefs
ld call -performSegueWithIdentifier: directly. But I'm not seeing how to define the additional segue + identifier in IB. Thx, -Carl > >> On 5 Sep 2015, at 01:03, Carl Hoefs wrote: >> >> iOS 8.4.1 >> >> I need to segue from a UITableView to different view

iOS: clearing the keyboard word suggestion bar

2015-10-21 Thread Carl Hoefs
iOS 8.4 I'm using a UITextField with "secure text entry" enabled for a password field. This works well, but when subsequent text fields bring up the keyboard, guess what shows up by default in the word suggestion bar atop the keyboard. That's right - the password in clear text! This sounds lik

Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
iOS 9.1, iPhone 5S, ObjC I'm getting the following runtime warning due to multiple simultaneous UIAlertControllers presenting at the same time: Warning: Attempt to present on which is already presenting I know only one alert view controller can be presenting at a time, so the way I thought

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
ould never need more than one presented at a time. > > Sent from my iP6+ > >> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński wrote: >> >> You should present next UIAlertController when first one has been dismissed >> (when UIAlertAction handler is c

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
2015, at 5:44 PM, Tomasz Muszyński >>>> wrote: >>>> >>>> You should present next UIAlertController when first one has been >>>> dismissed (when UIAlertAction handler is called). >>>> >>>> Tomek >>>> >>>

Re: Multiple simultaneous UIAlertControllers

2015-11-05 Thread Carl Hoefs
sure the WWDC 2015 video on NSOperations tackles a similar scenario > in a quite elegant way. That might be worth investigating. > > Peter > >> On Nov 5, 2015, at 6:42 PM, Carl Hoefs >> wrote: >> >> A queue of what? I would think that if only a single alert view c

Re: Multiple simultaneous UIAlertControllers

2015-11-06 Thread Carl Hoefs
On Nov 5, 2015, at 3:53 PM, Eric E Dolecki wrote: > > That's the way. You should never need more than one presented at a time. > > >> On Nov 5, 2015, at 5:44 PM, Tomasz Muszyński wrote: >> >> You should present next UIAlertController when first one has been dismissed >> (when UIAlertAction

Re: Multiple simultaneous UIAlertControllers

2015-11-07 Thread Carl Hoefs
On Nov 6, 2015, at 3:06 PM, Graham Cox wrote: > >> On 6 Nov 2015, at 10:58 AM, Carl Hoefs >> wrote: >> >> (As a general thought, though, it would appear that UIAlertController >> should be a singleton app-wide, and it should manage its own serialized >>

iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Carl Hoefs
I was about to implement my own singleton class to act as an app-wide context repository, but then I thought: wouldn't it be simpler just to use the appDelegate for that purpose? It's a singleton already and available to all classes via [[UIApplication sharedApplication] delegate]. All I need to

Re: iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Carl Hoefs
-Carl > On Dec 1, 2015, at 4:55 PM, Quincey Morris > wrote: > > On Dec 1, 2015, at 12:58 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: > >> available to all classes via [[UIApplication sharedApplication] delegate]. > >> Are there any dr

Obtaining a value from a hex representation

2016-01-08 Thread Carl Hoefs
A user enters the hexadecimal representation of a number like "0x31C8FD" into a text field. The intValue of such strings is 0. Is there a Cocoa method (like .hexValue) to convert the hex representation string into a value? -Carl ___ Cocoa-dev mailin

Re: Obtaining a value from a hex representation

2016-01-08 Thread Carl Hoefs
On Jan 8, 2016, at 3:16 PM, Steve Mills wrote: > > Either use NSScanner or strtol if you have char* (or strtoll if it's longer > than 8 hex chars). > Sent from iCloud's ridiculous UI, so, sorry about the formatting > Hadn't thought to use NSScanner, though it appears a bit overkill. strtoll()

Re: Panes vs. Separate Windows

2016-01-11 Thread Carl Hoefs
FWIW, I find it odd that so many apps these days seem to be following Xcode's "lead", if you want to call it that. I still miss Xcode 3.2.6 because I could configure it for the way *I* was most productive. Now you gotta use that ginormous "plate" window. It shows you what it wants to show you wh

Re: Obj-C - your thoughts on hiding data members?

2016-01-27 Thread Carl Hoefs
> On Jan 27, 2016, at 4:38 AM, Dave wrote: > >>> I'm going to step out on a limb and since Xcode has supported editing in UTF-8 and 16, that we look into those character sets and pick some symbols that accurately represent public, protected and private. >>> >>> Now you’re pull

UITableView -reloadData woes

2016-02-12 Thread Carl Hoefs
iOS 9.2 Is there a trick to using UITableView -reloadData? I can't get it to do anything. My view controller has a UITableView instance (VC is both UITableView delegate and dataSource), and I populate it with cells from my data source via the delegate callback method -tableView:cellForRowAtInd

Re: UITableView -reloadData woes

2016-02-12 Thread Carl Hoefs
> On Feb 12, 2016, at 1:39 PM, Quincey Morris > wrote: > > I think the one thing you can count on is that the ‘reloadData’ API isn’t > broken. But it's very tempting to think so... ;-) When I issue the -reloadData, the -tableView:numberOfRowsInSection: callback gets invoked. But, it returns

Re: Cocoa-dev Digest, Vol 13, Issue 82

2016-02-12 Thread Carl Hoefs
, 2016, at 5:53 PM, cocoa-dev-requ...@lists.apple.com wrote: >> >> Message: 1 >> Date: Fri, 12 Feb 2016 12:37:53 -0800 >> From: Carl Hoefs >> To: "Cocoa-dev@lists.apple.com dev" >> Subject: UITableView -reloadData woes >> Message-ID: >> <

Re: UITableView -reloadData woes

2016-02-12 Thread Carl Hoefs
On Feb 12, 2016, at 4:28 PM, Quincey Morris wrote: > > On Feb 12, 2016, at 16:23 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> When I issue the -reloadData, the -tableView:numberOfRowsInSection: callback >> gets invoked. But, it return

Triggering UITableView's -didSelectRowAtIndexPath: delegate callback

2016-02-27 Thread Carl Hoefs
iOS 9.2 At certain times I need to update the data source for a table view. Then I cause the row that was updated to be selected using UITableView's -selectRowAtIndexPath::: method. That much works fine. The problem is that the delegate callback associated with selecting that row doesn't occu

Re: Triggering UITableView's -didSelectRowAtIndexPath: delegate callback

2016-02-27 Thread Carl Hoefs
On Feb 27, 2016, at 12:10 PM, Ben Kennedy wrote: > >> On Feb 27, 2016, at 11:01 AM, Carl Hoefs >> wrote: >> >> The problem is that the delegate callback associated with selecting that row >> doesn't occur. And indeed, I have since found that the

Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
iOS 9.2 The 2016 Apple documentation shows UISwitch -onImage and -offImage properties. They're not noted as deprecated, except for iOS 7, yet they don't seem to do anything on iOS9. Xcode shows these properties to be settable. I have set them both, in Xcode and in my app code, but they seem to

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
> -- > Gary L. Wade (Sent from my iPhone) > http://www.garywade.com/ > >> On Mar 4, 2016, at 11:10 AM, Carl Hoefs >> wrote: >> >> iOS 9.2 >> >> The 2016 Apple documentation shows UISwitch -onImage and -offImage >> properties. They're n

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
or the proper state? I.e. Normal ? > On Fri, Mar 4, 2016 at 6:41 PM Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: > I replaced the UISwitch with a UIButton. But when I set the button's new > image in the event method (myButton.imageView.image = ...), still noth

Re: Customizing a UISwitch?

2016-03-04 Thread Carl Hoefs
ttp://www.garywade.com/ > >> On Mar 4, 2016, at 3:40 PM, Carl Hoefs >> wrote: >> >> I replaced the UISwitch with a UIButton. But when I set the button's new >> image in the event method (myButton.imageView.image = ...), still nothing >> happens (the butt

Variable type representations

2016-03-11 Thread Carl Hoefs
On x86_64 OS X systems, ObjC variable type 'long' uses an 8-byte representation, whereas 'int' uses 4 bytes. I'm converting NSStrings to values, but it has no 'longValue' method or property. According to the documentation, NSString supports: doubleValue - 8 bytes floatValue- 4 bytes intVa

Re: Window updates stall on headless Mac mini

2016-03-18 Thread Carl Hoefs
> On Mar 18, 2016, at 1:16 PM, Steve Mills wrote: > > Any wild theories? We ran into similar issues running headless. Adding a 'headless display emulator' seemed to be the cure for us: http://www.amazon.com/CompuLab-fit-Headless-Display-Emulator/dp/B00FLZXGJ6 HTH, -Carl

Re: Window updates stall on headless Mac mini

2016-03-19 Thread Carl Hoefs
> On Mar 19, 2016, at 1:02 AM, Steve Mills wrote: > > On Mar 18, 2016, at 17:14:25, Carl Hoefs > wrote: >> >> >> We ran into similar issues running headless. Adding a 'headless display >> emulator' seemed to be the cure for us: >> &g

Creating a series of sequenced files

2016-04-16 Thread Carl Hoefs
I have a daemon process that needs to generate a series of sequenced files (named sequentially, such as "file_01944576_1.dat", "file_01944576_2.dat", etc.) in the same directory. Does Cocoa provide a way to do this? NSFileManager's -createFileAtPath:contents:attributes: method states: "If a fil

Re: Creating a series of sequenced files

2016-04-16 Thread Carl Hoefs
ficient - trying 1000s of times until the next available number every time a new file needs to be written, and also every time the latest-written file needs to be retrieved. But I'm hearing this is the only way? -Carl > On Apr 16, 2016, at 2:58 PM, Quincey Morris > wrote: > >

Re: Creating a series of sequenced files

2016-04-16 Thread Carl Hoefs
> On Apr 16, 2016, at 3:20 PM, Quincey Morris > wrote: > > On Apr 16, 2016, at 15:10 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> But I'm concerned mainly with efficiency, as determining the next number in >> the naming seque

BOOL parameter passed as nil object

2016-04-18 Thread Carl Hoefs
Suppose I have an object with a declared method signature: -(void)myMethod:(BOOL)a_bool; Q1: If I invoke it like this: [self performSelector:@selector(myMethod:) withObject:nil]; // nil obj Will argument a_bool end up with a 0 value assigned to it? Q2: But if I invoke it like this: [self p

Re: BOOL parameter passed as nil object

2016-04-20 Thread Carl Hoefs
On Apr 19, 2016, at 1:50 PM, John McCall wrote: > We strongly encourage you not to worry about any of this and just always call > methods using the right method signature. Roger, wilco! (It had a 'smell' to it, but I wasn't quite certain why. Now I know! ;-) -Carl ___

Re: BOOL parameter passed as nil object

2016-04-22 Thread Carl Hoefs
> On Apr 19, 2016, at 1:50 PM, John McCall wrote: > > We strongly encourage you not to worry about any of this and just always call > methods using the right method signature. Sorry to beat a dead horse, but does this mean that there is no inherent way to handle the 1000s of Foundation and Ap

Re: BOOL parameter passed as nil object

2016-04-22 Thread Carl Hoefs
> On Apr 22, 2016, at 2:57 PM, Quincey Morris > wrote: > > The recommended way to have them performed on the main thread is to use a > block and GCD dispatch_async (dispatch_get_main_queue (), …). Ahh, that's clean. Implemented and working! That saves me a lot of effort. Thanks! -Carl __

Re: BOOL parameter passed as nil object

2016-04-22 Thread Carl Hoefs
On Apr 22, 2016, at 2:57 PM, Quincey Morris wrote: > > If you must use performSelector, then you can write your own glue method that > takes an object parameter and invokes the API that takes the scalar parameter. -performSelectorOnMainThread:withObject:waitUntilDone:modes: can handle NSRunLo

Re: BOOL parameter passed as nil object

2016-04-22 Thread Carl Hoefs
), kCFRunLoopCommonModes, ^{ > //Code to be performed on main thread > }); > > >> On Apr 22, 2016, at 16:00, Carl Hoefs wrote: >> >> On Apr 22, 2016, at 2:57 PM, Quincey Morris >> wrote: >>> >>> If you must use performSelector, then you can writ

Re: Very basic need, very difficult to achieve.

2016-05-03 Thread Carl Hoefs
> On May 3, 2016, at 7:18 PM, Graham Cox wrote: > > I went to the app store (arrgh!!) to redownload the full installer image (why > oh why is this not available as a developer download from apple dev? Using > the app store is an abysmal non-choice to force on developers). I could not > downlo

Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
I'm building for iOS 9.3, and am using NSOperationQueue throughout. Once in a while, NSOperationQueue -addOperation: throws an exception. I guess this is a well-known bug going all the way back to 2008. I found Mike Ash's writeup on the issue, and have downloaded his replacement class, RAOperati

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
> On May 6, 2016, at 1:35 PM, John McCall wrote: > >> On May 6, 2016, at 1:32 PM, Carl Hoefs >> wrote: >> I'm building for iOS 9.3, and am using NSOperationQueue throughout. Once in >> a while, NSOperationQueue -addOperation: throws an exception. I guess

Re: Receiver type for instance message is a forward declaration

2016-05-06 Thread Carl Hoefs
> On May 6, 2016, at 2:34 PM, Quincey Morris > wrote: > > On May 6, 2016, at 13:32 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> Once in a while, NSOperationQueue -addOperation: throws an exception. I >> guess this is a well-know

Re: Receiver type for instance message is a forward declaration

2016-05-09 Thread Carl Hoefs
> On May 6, 2016, at 3:45 PM, Carl Hoefs wrote: > >> These days, if I had any doubts about NSOperationQueue, I’d switch to using >> GCD directly. There’s very little that NSOperationQueue does that GCD doesn’t Alas, there appear to be no GCD dispatch queue intro

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 9, 2016, at 1:51 PM, Quincey Morris > wrote: > > Perhaps it’s worth going back to that, in the hope that your crashes get more > frequent, and you can investigate what really causes them. At last, it blew again! Can someone interpret this? The context is that I touched a button in m

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 3:52 PM, Quincey Morris > wrote: > > On May 10, 2016, at 13:38 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> At last, it blew again! > > Well, here’s the exception message: > >> An -observeValu

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:13 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:05 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> I'm not sure how context is to be used here > > It has to be a value that’s unique to the pie

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:39 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:22 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> I will set 'context' and use it in my check instead. > > Yup, use the context to deci

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 4:55 PM, Carl Hoefs > wrote: > > >> On May 10, 2016, at 4:39 PM, Quincey Morris >> wrote: >> >> On May 10, 2016, at 16:22 , Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >>> >>> I will

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 5:04 PM, Quincey Morris > wrote: > > On May 10, 2016, at 16:43 , Roland King > wrote: >> >> Well no he hasn’t > > Correct … no he hasn’t. I mis-edited a longer draft of the post. > >> Now that I've changed things over to use the context value, I g

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Carl Hoefs
> On May 10, 2016, at 5:16 PM, Roland King wrote: > >> >> 2016-05-10 16:58:36.066 iApp[2549:2131821] *** Terminating app due to >> uncaught exception 'NSInternalInconsistencyException', reason: '( >>"> NO; view = ; target= <(action=oneFingerDoubleTap:, >> target=)>; numberOfTapsRequired =

Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
In iOS 9.3, I have a UIView that displays a graph, and the view is pinchable. That works fine but I want to programmatically pinch the UIView so the default display initially shows the graph a bit smaller. How can I do this? Alternately, I've tried setting self.view.contentScaleFactor but this p

Re: Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
> On May 11, 2016, at 1:38 PM, David Duncan wrote: > >> On May 11, 2016, at 1:32 PM, Carl Hoefs >> wrote: >> >> In iOS 9.3, I have a UIView that displays a graph, and the view is >> pinchable. That works fine but I want to programmatically pinch t

Re: Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
On May 11, 2016, at 1:45 PM, Carl Hoefs wrote: > >> On May 11, 2016, at 1:38 PM, David Duncan wrote: >> >>> On May 11, 2016, at 1:32 PM, Carl Hoefs >>> wrote: >>> >>> In iOS 9.3, I have a UIView that displays a graph, and the vi

Re: Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
> On May 11, 2016, at 1:51 PM, Carl Hoefs > wrote: > > On May 11, 2016, at 1:45 PM, Carl Hoefs > wrote: >> >>> On May 11, 2016, at 1:38 PM, David Duncan wrote: >>> >>>> On May 11, 2016, at 1:32 PM, Carl Hoefs >>>> wrote: &g

Re: Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
> On May 11, 2016, at 2:08 PM, Quincey Morris > wrote: > > On May 11, 2016, at 13:56 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> I just tried UIScrollView & -setZoomScale:. No effect. > > I think you’re flailing now. ;) >

Re: Programmatically pinch a UIView

2016-05-11 Thread Carl Hoefs
> On May 11, 2016, at 2:33 PM, Quincey Morris > wrote: > > On May 11, 2016, at 14:14 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> the UIView that's currently there handles pinch zoom in/out fine. > > You should at this poi

Recurrent background thread

2016-05-13 Thread Carl Hoefs
I want a method running on a background thread to reissue itself after it is done processing. How can I do this? I'm using the following code but it runs just once and is never heard from again... // initial invocation from main thread [self performSelectorInBackground:@selector(_checkS

Re: Recurrent background thread

2016-05-13 Thread Carl Hoefs
> userInfo:nil repeats:YES]; > > Hope this helps. > > Doug Hill > > >> On May 13, 2016, at 12:34 PM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> I want a method running on a background thread to reis

Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
I have a daemon app built on Foundation (aka "command line tool") running in the background and I need it to issue a textual email on certain conditions. The solutions for emailing that I've been able to find (NSWorkspace, NSSharingService, LSOpenCFURLRef) all involve launching an email client

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:33 AM, Jens Alfke wrote: > >> On Jul 7, 2016, at 9:13 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> I have a daemon app built on Foundation (aka "command line tool") running in >> the backgrou

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:55 AM, Jens Alfke wrote: > > >> On Jul 7, 2016, at 9:44 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> It seems a bit odd to me that I can connect all sorts of little network >> devices (webcams, net

Re: Emailing from a daemon process

2016-07-07 Thread Carl Hoefs
> On Jul 7, 2016, at 9:55 AM, Jens Alfke wrote: > > >> On Jul 7, 2016, at 9:44 AM, Carl Hoefs > <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> It seems a bit odd to me that I can connect all sorts of little network >> devices (webcams, net

Vertical orientation of UISlider

2016-07-20 Thread Carl Hoefs
iOS 9 Is there a way to change the orientation of a UISlider to vertical instead of horizontal? -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Vertical orientation of UISlider

2016-07-20 Thread Carl Hoefs
ing a transform to the slider? A simple rotation > should do the trick. > > > Jeff Kelley > > slauncha...@gmail.com <mailto:slauncha...@gmail.com> | @SlaunchaMan > <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/> >&g

Re: Vertical orientation of UISlider

2016-07-20 Thread Carl Hoefs
Out of interest, I just tried swapping the slider's bounds size.width and size.height. It seems to have no effect. The transform works; it rotates the control about its center point. Thx! -Carl > On Jul 20, 2016, at 12:11 PM, Jens Alfke wrote: > > >> On Jul 20, 2016, at

Re: Do Debug Apps Expire on iOS?

2016-07-22 Thread Carl Hoefs
Go to Window -> Devices -> View Device Logs -Carl > On Jul 22, 2016, at 4:17 AM, Charles Jenkins wrote: > > Thank you all. I’ll start my research on how to find crash logs. > > On Thu, Jul 21, 2016 at 10:30 AM, Roland King wrote: > >> >>> On 21 Jul 2016, at 22:15, Steve Bird wrote: >>> >

Re: array = [NSArray new] or array = [NSArray array]?

2016-08-19 Thread Carl Hoefs
> On Aug 19, 2016, at 1:46 PM, Quincey Morris > wrote: > > My point is that Apple might revisit the implementation of NSArray at any > time (in these Swiftian days, stranger things have happened), and choose to > write it with full ARC compatibility, which means there might not be any > auto

Re: Xcode 8 causes scroll issue when displaying keyboard

2016-10-11 Thread Carl Hoefs
Rick, I think I may have encountered similar issues. -viewWillAppear: occurs very early in the view instantiation process, too early for certain things to execute successfully, and so it's likely that becomeFirstResponder() may not work properly or reliably from -viewWillAppear:. I solved my is

Obtaining the color of the screen at a known point

2016-11-05 Thread Carl Hoefs
I have an iOS app in which the user touches the screen, and I need to read the color of screen at the touched point. How can this be done in iOS 9.3? The only solution I could find uses CGDisplayCreateImageForRect() and CGDisplayAddressForPosition(), which apparently no longer exist. -Carl __

Re: Obtaining the color of the screen at a known point

2016-11-05 Thread Carl Hoefs
On Nov 5, 2016, at 5:15 PM, Richard Charles wrote: > >> On Nov 5, 2016, at 5:50 PM, Carl Hoefs >> wrote: >> >> I have an iOS app in which the user touches the screen, and I need to read >> the color of screen at the touched point. How can this be done in iOS

Re: Documentation Workflow

2016-11-17 Thread Carl Hoefs
Fixing the layout of the documentation doesn't help the core problem, namely, the way in which it's organized. Each page is so sparse as to be almost worthless. You have to drill down 2, 3, 4 or more links to find the information that you want, dragging the reader through page after page... Why

iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread Carl Hoefs
I get the following crash in my iOS 9 app simply by adding a CALayer to the current view controller's self.view.layer and then dismissing the current view controller. Simplified code: @property (strong,nonatomic) CALayer *layer; . . . _layer = [[CALayer alloc] init]; [_layer se

Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread Carl Hoefs
te > directly to the ivar? > > If not, that's your problem. > > Doug > >> On Dec 6, 2016, at 11:44 AM, Carl Hoefs >> wrote: >> >> I get the following crash in my iOS 9 app simply by adding a CALayer to the >> current view controller's

Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread Carl Hoefs
> On Dec 6, 2016, at 1:24 PM, David Duncan wrote: > > Your safest bets are to either clear the delegate of the layer at an > appropriate time (possibly in your view controller’s dealloc is all that is > necessary), or to use a UIView instead of a raw CALayer in this case. > Removing the layer

Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread Carl Hoefs
> On Dec 6, 2016, at 1:33 PM, Carl Hoefs wrote: > >> On Dec 6, 2016, at 1:24 PM, David Duncan wrote: >> >> Your safest bets are to either clear the delegate of the layer at an >> appropriate time (possibly in your view controller’s dealloc is all that is >

Re: Documentation Workflow

2016-12-06 Thread Carl Hoefs
> On Dec 3, 2016, at 11:52 AM, Richard Charles wrote: > >> On Dec 2, 2016, at 11:34 AM, Slipp Douglas Thompson >> wrote: >> >> Alternatively, there's always archive.org's Wayback Machine. > >> Since developer.apple.com's URL paths have changed quite a bit with the >> recent narrow-body-gian

Re: My app only shows a black screen in the recent apps list

2016-12-30 Thread Carl Hoefs
> On Dec 30, 2016, at 12:34 PM, David Duncan wrote: > > Honestly, just remove UIApplicationExistsOnSuspend. Its simply not a behavior > that is expected of modern iOS applications. True in general, but UIApplicationExitsOnSuspend is useful for multi-user professional apps (such as medical app

Re: My app only shows a black screen in the recent apps list

2016-12-30 Thread Carl Hoefs
> On Dec 30, 2016, at 4:00 PM, Quincey Morris > wrote: > > On Dec 30, 2016, at 13:58 , Carl Hoefs <mailto:newsli...@autonomy.caltech.edu>> wrote: >> >> UIApplicationExitsOnSuspend is useful for multi-user professional apps (such >> as medical apps ass

Re: iOS database within sandbox

2014-08-23 Thread Carl Hoefs
Wow, I didn’t realize there were so many options. I’ll be looking into all of these (SQLite, CoreData, FMDB, Realm) to see which fits into my project's design best (and which appeals to me). Thanks for all the great suggestions! -Carl ___ Cocoa-dev

Re: iOS database within sandbox

2014-08-23 Thread Carl Hoefs
On Aug 23, 2014, at 9:23 AM, Glenn L. Austin wrote: > CoreData is not a database (according to Marcus Zarra -- and he should know). > Even though it *can* use an SQLite data store (and most people do that), it > doesn't depend upon SQLite functionality. However, specifically on iOS, I take i

Scaling an NSImage to have exact pixel dimensions

2014-10-09 Thread Carl Hoefs
OS X 10.9 I need to scale an NSImage's dimensions to exactly 640x480 pixels before sending it remotely for processing. If I use NSImage's -setSize:(NSSize) method, it does set the size - temporarily. If I then try to serialize that NSImage into an NSData for transfer, that resize information se

Re: Scaling an NSImage to have exact pixel dimensions

2014-10-09 Thread Carl Hoefs
On Oct 9, 2014, at 8:05 PM, Ken Thomases wrote: > On Oct 9, 2014, at 9:08 PM, Carl Hoefs wrote: > >> I need to scale an NSImage's dimensions to exactly 640x480 pixels before >> sending it remotely for processing. > >> What is the correct way to do this? >

Re: Scaling an NSImage to have exact pixel dimensions

2014-10-10 Thread Carl Hoefs
On Oct 10, 2014, at 1:02 AM, Graham Cox wrote: > > // ... set up destination context ... > > [[NSGraphicsContext currentContext] setImageInterpolation: > NSImageInterpolationHigh]; > [sourceImage drawInRect:dest fromRect:NSZeroRect operation:NSCompositeCopy > fraction:1.0 respectFlipped:YES hi

Background CIFilter processing?

2014-11-03 Thread Carl Hoefs
I’m developing a background daemon server process (Cocoa, OSX 10.10) that will process (analyze, segment, classify) an image sent to it on demand, and then send the processed image back to the client. For some operations, CIFilters would be ideal to use. However, CIFilters require the QuartzCore

Re: Background CIFilter processing?

2014-11-03 Thread Carl Hoefs
PM, Tamas Nagy wrote: > No, CIFIlters should work fine in background processes. > >> On 03 Nov 2014, at 21:29, Carl Hoefs wrote: >> >> I’m developing a background daemon server process (Cocoa, OSX 10.10) that >> will process (analyze, segment, classify) an i

Re: Background CIFilter processing?

2014-11-04 Thread Carl Hoefs
image data come from. > >> On 03 Nov 2014, at 21:48, Carl Hoefs wrote: >> >> Awesome! >> >> The only general restriction would be in using something like the Video >> Input patch, correct? As far as I can tell, that patch needs to render >> somewh

Altering the size of UISlider's “slider ball”

2014-11-25 Thread Carl Hoefs
iOS 8 Is there some way (in IB or programmatically) to alter the size of the “slider ball” of a UISlider? -Carl ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mo

Re: Altering the size of UISlider's “slider ball”

2014-11-25 Thread Carl Hoefs
> On Nov 25, 2014, at 6:10 PM, Roland King wrote: > >> On 26 Nov 2014, at 9:58 am, Carl Hoefs >> wrote: >> >> iOS 8 >> Is there some way (in IB or programmatically) to alter the size of the >> “slider ball” of a UISlider? >> -Carl >> &g

UIImagePickerController confused by landscape-only layout

2014-12-17 Thread Carl Hoefs
How can I make the iOS 8 camera image picker (UIImagePickerController aka PLUICameraViewController) present properly in a landscape-only mode app? When I do this, the picker comes up in landscape mode but the camera image within it is displayed rotated by +90 degrees no matter the rotation of th

Re: system sounds in iOS

2014-12-20 Thread Carl Hoefs
On Dec 19, 2014, at 11:12 PM, Donald Hall wrote: > I want to play a sound indicating that the user has tried to type a > non-allowed character (e.g. a letter where a number is needed) in conjunction > with "textField:textField shouldChangeCharactersInRange:replacementString:” I > was thinking

Re: Idea for Improving Vibrancy

2015-02-16 Thread Carl Hoefs
On Feb 16, 2015, at 5:34 AM, Roland King wrote: > And for anyone, like me, who doesn't like the vibrancy effect, you can turn > it off in preferences. Is this the right setting: “◽ Disable Windows® look and feel” -Carl ___ Cocoa-dev mailing list (

Re: Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Carl Hoefs
> On another note, I don't know why this is having trouble: > > dispatch_apply(4950, >dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, > 0), >^(size_t idx) { <--- error > }); > Incompatible block pointer types passing 'int (^)(size_t)' to para

Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Carl Hoefs
OS X 10.10 I have a highly CPU-bound project that parallelizes well. A small case has about 5000 tasks that can execute concurrently (max is ~100,000). I would like to use GCD queues to take advantage of the 24 cores I have on my MacPro. Does GCD automatically limit the number of tasks that become

Re: Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Carl Hoefs
> On Apr 9, 2015, at 2:23 PM, Clark Smith Cox III > wrote: > >> On Apr 9, 2015, at 12:07, Carl Hoefs >> wrote: >>> >>> I have a highly CPU-bound project that parallelizes well. A small case >>> has >>> about 5000 tasks that can execute co

Re: Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Carl Hoefs
Wonderful! Thank you for clearing this up for me! -Carl > >> On Apr 9, 2015, at 12:07, Carl Hoefs >> wrote: >> >> OS X 10.10 >> >> I have a highly CPU-bound project that parallelizes well. A small case >> has >> about 5000 tasks that can execute

Re: Does GCD auto-limit concurrent tasks to number of cores?

2015-04-09 Thread Carl Hoefs
> On Thu, 9 Apr 2015 14:40:16 -0500, Sean McBride said: > > Not just IO, but memory usage too. If you have 24 cores, and GCD spins up > 24 simultaneous 'tasks', and each needs 2 GB of RAM, then you better hope > you have 48 GB of RAM too, or you'll swap and easily end up dog slow. I just now ran

Limiting GCD concurrent queues

2015-05-08 Thread Carl Hoefs
OS X 10.10.3 Xcode 6.3.1 I need to limit a GCD concurrent queue to a specific number of concurrently executing tasks (less than the number of cores available). The only way I can get this to work is by adding "external plumbing" in the form of semaphores to the dispatch invocation: dispatch

Re: Limiting GCD concurrent queues

2015-05-08 Thread Carl Hoefs
> On May 8, 2015, at 1:19 PM, Ken Thomases wrote: > > You should use an NSOperationQueue. You can set its > maxConcurrentOperationCount. You can add blocks to it using > -addOperationWithBlock: or by instantiating NSBlockOperation objects and > adding those with -addOperation:. Awesome, th

Using CFSTR() with const char * variable

2015-06-05 Thread Carl Hoefs
If I use CFSTR() in the following way: CFStringRef mystr = CFSTR( "This is a string" ); there is no problem. However, if I use a variable instead of “string” Xcode flags this as an error: const char *mystring = "This is a string"; CFStringRef mystr = CFSTR( mystring );

Re: Using CFSTR() with const char * variable

2015-06-05 Thread Carl Hoefs
> On Jun 5, 2015, at 8:17 PM, Ken Thomases wrote: > > On Jun 5, 2015, at 10:02 PM, Carl Hoefs > wrote: > >> If I use CFSTR() in the following way: >> CFStringRef mystr = CFSTR( "This is a string" ); >> there is no problem. >> >> Howev

Re: Language options: Objective-C, Swift, C or C++?

2015-06-12 Thread Carl Hoefs
2-cent note from an uninformed lurker… I busted my rear for couple of years learning and getting to think in Obj C, and I love the object oriented feel it has, especially compared with the likes of C++ and Java, where object orientation feels like a tacked-on afterthought. Okay, so now there'

  1   2   3   >