Exiting non-POSIX threads?

2013-07-29 Thread Oleg Krupnov
I'm writing an exception handler where I want to terminate a crashed thread without terminating the entire process. Before GCD I used the following code: if ([NSThread currentThread] != [NSThread mainThread]) { [NSThread exit]; } However for GCD thread (created with dispatch_async()) I get th

Re: Exiting non-POSIX threads?

2013-07-29 Thread Steve Sisak
At 11:34 AM +0300 7/29/13, Oleg Krupnov wrote: However for GCD thread (created with dispatch_async()) I get the following signal: pthread_exit() may only be called against threads created via pthread_create() Is there a way to handle this case? Just return from the block you passed to dispatc

Re: Exiting non-POSIX threads?

2013-07-29 Thread Oleg Krupnov
Thanks for your answer, Steve, but the problem remains. In my case, the exception has already been thrown inside the block and I cannot catch it or modify it in any way in my handler. I'm basically writing an uncaught exception handler. My app should show a crash report window and then terminate i

UITableView Cell reordering when cell size is larger than screen size

2013-07-29 Thread Tharindu Madushanka
Hi, I have a UITableView with first cell is not re-orderable and all other cells are having re-order handle. Also I have a UIRefreshControl on table view. UITableView cells are at 600 px height. When I click on re-order handle of any cell cell immediately starts moving downwards. It's very hard t

Screen capture on OS X

2013-07-29 Thread Darren Wheatley
Hi, I have a Mac app that loads a Leaflet.js map into a web view. I've written a screenshot method to grab the map for inclusion in a print view. This is largely based on the examples here: http://stackoverflow.com/questions/11948241/cocoa-how-to-render-view-to-image I'm writing my app on 10.8

Re: Exiting non-POSIX threads?

2013-07-29 Thread Ken Thomases
On Jul 29, 2013, at 4:27 AM, Steve Sisak wrote: > At 11:34 AM +0300 7/29/13, Oleg Krupnov wrote: >> Is there a way to exit a GCD thread? > > There's no such thing as a "GCD thread" only queues. > > (OK, there's a pool of threads that GCD uses to service queues, but you don't > own them) And yo

Re: Screen capture on OS X

2013-07-29 Thread Ken Thomases
On Jul 29, 2013, at 7:15 AM, Darren Wheatley wrote: > I've written a screenshot method to grab the map for inclusion in a print > view. This is largely based on the examples here: > I've tried the three methods shown in the SO post, and only the > CGWindowListCreateImage works correctly in my a

Re: Exiting non-POSIX threads?

2013-07-29 Thread Ken Thomases
On Jul 29, 2013, at 4:54 AM, Oleg Krupnov wrote: > Thanks for your answer, Steve, but the problem remains. > > In my case, the exception has already been thrown inside the block and > I cannot catch it or modify it in any way in my handler. I'm basically > writing an uncaught exception handler. M

Re: UITableView Cell reordering when cell size is larger than screen size

2013-07-29 Thread Fritz Anderson
> I have a UITableView with first cell is not re-orderable and all other > cells are having re-order handle. Also I have a UIRefreshControl on table > view. > > UITableView cells are at 600 px height. When I click on re-order handle of > any cell cell immediately starts moving downwards. Right-cl

Re: UITableView Cell reordering when cell size is larger than screen size

2013-07-29 Thread Fritz Anderson
On 29 Jul 2013, at 5:35 AM, Tharindu Madushanka wrote: > I have a UITableView with first cell is not re-orderable and all other > cells are having re-order handle. Also, consider UITableView.tableHeaderView for this purpose. — F ___ Cocoa-d

Auto Save and Versions for a Shoebox App

2013-07-29 Thread Jerry Krinock
Auto Save and Versions is a good feature for my document-based app. But a large group of users keep all of their data in one document, and having to think about a document is a poor experience and has contributed to bad reviews by these users. So I am making a "lite" version of the app for th

Re: Getting a splash screen to show

2013-07-29 Thread Keith Knauber
> > On May 15, 2013, at 11:29 AM, Steve Mills wrote: > > I added more nextEventMatchingMask's and the 4th one would actually cause the > document to be restored, which was way too early in the init method to do > that. But I found this, which seems to work much more reliably. It takes care > o

UIButton events on a CALayer

2013-07-29 Thread Ian was here
I've added a UIButton to a CALayer. The button appears as it should, but the button won't send a touch event. I've Googled around on this subject, but haven't found a solution that works in this case. Has anyone come across this issue? Below is the source. UIButton *prefsButton = [[UIButton a

Re: UITableView Cell reordering when cell size is larger than screen size

2013-07-29 Thread Tharindu Madushanka
Hi, Great. First I will try with making first cell into header view. :) Following describes more about my situation. It's not always very large but it fails when its too large. In the design the cells can be smaller size to larger size, the cell height is determined by the content on cell. User c

Re: UIButton events on a CALayer

2013-07-29 Thread Kyle Sluder
On Mon, Jul 29, 2013, at 05:52 PM, Ian was here wrote: > I've added a UIButton to a CALayer. Huh? Views and layers are separate concepts. Views own layers; you can't add a button to a layer. > CALayer *prefsLayer = [prefsButton layer]; > > [prefsLayer setFrame:CGRectMake( x, y, 50.0, 40.0 )]; >

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
I've just hit this too, and my best guess as to why it's so reproducible for me but this is the *only* mention that Google can find is that my window does trigger updates to one of its restorable values early in its lifetime. Unfortunately that's unavoidable. I just gave up and dropped the rest

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 19:33 , Lee Ann Rucker wrote: > I've just hit this too, and my best guess as to why it's so reproducible for > me but this is the *only* mention that Google can find is that my window does > trigger updates to one of its restorable values early in its lifetime. > Unfortunat

Re: Getting a splash screen to show

2013-07-29 Thread Jens Alfke
On Jul 29, 2013, at 4:08 PM, Keith Knauber wrote: > I can't have my splash screen get stuck on, and obscure anything in case a > modal dialog decides to present itself. The general recommendation is to avoid splash screens altogether. If your app takes long enough to launch that the user woul

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 8:14 PM, Quincey Morris wrote: > On Jul 29, 2013, at 19:33 , Lee Ann Rucker wrote: > >> I've just hit this too, and my best guess as to why it's so reproducible for >> me but this is the *only* mention that Google can find is that my window >> does trigger updates to one o

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 21:03 , Lee Ann Rucker wrote: > The main thread got stopped shortly after the first call to [wc window] - not > in any restorable value's setter, though; that would've been obvious - but > the actual crash was in a different thread. It's definitely at a point where > one or

How to add device to Team Provisioning Profile?

2013-07-29 Thread Rick Mann
Since Xcode provisioning is still down, is there another way to add a UDID to the team provisioning profile? -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 9:03 PM, Lee Ann Rucker wrote: > > Never considered clearing the windowController; what effect would that have > on the window? Well, it didn't do away with the crash. The doc does say that encodeRestorableStateWithCoder will be called "at appropriate times", and I have e

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Eric Wing
> There are a couple of interesting points here. Perhaps the appearance of > 'probeGC' in Eric's backtrace suggests he's using garbage collection. Are > you doing so too? If not, then it wouldn't be surprising that the crash is > more reproducible for you. Eric was racing garbage collection for a z

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Lee Ann Rucker
On Jul 29, 2013, at 9:22 PM, Quincey Morris wrote: > On Jul 29, 2013, at 21:03 , Lee Ann Rucker wrote: > >> The main thread got stopped shortly after the first call to [wc window] - >> not in any restorable value's setter, though; that would've been obvious - >> but the actual crash was in a

Re: How to add device to Team Provisioning Profile?

2013-07-29 Thread Clark S. Cox III
No, but you can create a new profile in the meantime with the same appid, all of your team's devices and all of your team's development certificates. Once the Xcode integration is back up and running, you can just delete that profile and go back to using the automatically generated one. Sent fr

Re: Trying to understand/prevent crash using restorableStateKeyPaths in NSPersistentUI Work

2013-07-29 Thread Quincey Morris
On Jul 29, 2013, at 22:05 , Lee Ann Rucker wrote: > The repro case is to close the document and then reopen it. It doesn't reopen > the windows, it makes a new window of the same class as the old one. Looking > at Instruments right now I have one new window and windowController - stopped > in

CoreGraphics Image I/O Documentation

2013-07-29 Thread Kevin Meaney
Hi, Just checked on lists for an e-mail list on CoreGraphics or Image I/O without seeing an obviously appropriate list. So since I'm already subscribed here I thought I'd give this list a shot. In the header file for CGImageSource.h the only key that is listed as appropriate for the options di

Re: Exiting non-POSIX threads?

2013-07-29 Thread Kevin Meaney
Perhaps OP should be looking at using an xpc service. Kevin On 29 Jul 2013, at 15:54, Ken Thomases wrote: > On Jul 29, 2013, at 4:54 AM, Oleg Krupnov wrote: > >> Thanks for your answer, Steve, but the problem remains. >> >> In my case, the exception has already been thrown inside the block an

Re: How to add device to Team Provisioning Profile?

2013-07-29 Thread Rick Mann
On Jul 29, 2013, at 22:33 , Clark S. Cox III wrote: > No, but you can create a new profile in the meantime with the same appid, all > of your team's devices and all of your team's development certificates. > > Once the Xcode integration is back up and running, you can just delete that > profi

Re: How to add device to Team Provisioning Profile?

2013-07-29 Thread Clark S. Cox III
I can understand the frustration, but under most circumstances, editing a team profile would be ill-advised, as any changes you made would be overwritten the next time anyone on the team connected via Xcode. You can certainly make a case in a bug report, especially in light of the recent downti