Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Gideon King
OK, I have a single pane inspector which chains to another single pane inspector using pushPane. For this one particular pane, sometimes when we pop back to the parent, it gave the error. I tried putting a dealloc in my class and nilling out everything, but still got the problem. I then added

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Ken Thomases
On Jan 15, 2014, at 1:56 AM, Kyle Sluder wrote: > On Jan 14, 2014, at 9:05 PM, Quincey Morris > wrote: >> >> Second, I’ve noticed some very surprising behavior with weak references at >> dealloc time. If an object being deallocated has a weak reference to another >> object, and it was the onl

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Gideon King
That makes sense. This particular inspector is fairly simple, but it does use one other Omni component on it: some OUIColorComponentSlider objects. If the crash that Omni have seen was also with inspectors using that class, then that would point towards that doing something wrong. I’m kind of t

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Timothy Wood
On Jan 15, 2014, at 12:14 AM, Gideon King wrote: > I tried putting a dealloc in my class and nilling out everything, but still > got the problem. I then added >self.inspector = nil; >self.parentSlice = nil; > to my dealloc, and since then I have not been able to reproduce the problem >

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Quincey Morris
On Jan 15, 2014, at 00:23 , Ken Thomases wrote: > That doesn't make sense. A weak reference can't be the only reference to an > object. As I'm sure you know, objects are deallocated (and weak references > nil'd) when the last *strong* reference is broken. I think this was the scenario: — I

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Greg Parker
On Jan 15, 2014, at 12:59 AM, Quincey Morris wrote: > — When C’s reference count went to zero, object A’s reference count had also > gone to zero and A’s dealloc was still pending. (This is the part I’m a bit > hazy on, but the zeroing of weak references seems to be deferred sometimes, > perha

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Quincey Morris
On Jan 15, 2014, at 01:29 , Greg Parker wrote: > It sounds more like *B's* retain count had become zero I’m sure it hadn’t. C’s dealloc was the only place that the CFRetain was balanced. I believe I tried commenting out the CFRetain, to see if the crash went away, and duly observed B's memory

Re: How do I debug weak_unregister_no_lock?

2014-01-15 Thread Quincey Morris
On Jan 15, 2014, at 02:00 , Quincey Morris wrote: > commenting out the CFRetain I mean: CFRelease ___ 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

Re: Drag a window and get draggingEntered

2014-01-15 Thread Leonardo
Hi Kyle, Yes, definitively, I would like to do something like Safari, which uses drag manager to drag windows and tabs within the app. Actually I have coded that in a different way, without using the drag manager. I create a borderless window containing a small view at the top looking as a tiny cu

Re: UILabel's sizeToFit - only on re-used cells

2014-01-15 Thread Torsten Curdt
> > The size of the cell you get from dequeueReusableCellWithIdentifier is > meaningless until the cell gets added to the table view, which doesn’t > happen until you return the cell from the delegate method you’re in. > Not sure I understand why the cell size matters though. All views/labels have

What are the conditions for NSManagedObjectContextObjectsDidChangeNotification to get posted?

2014-01-15 Thread Jim McGowan
Hi, I’ve noticed that NSManagedObjectContextObjectsDidChangeNotifications are not getting posted on every change to my ManagedObjectContext. The NSManagedObjectContext docs say it gets posted during -processPendingChanges, which is “invoked automatically at least once during the event loop (at

Re: UILabel's sizeToFit - only on re-used cells

2014-01-15 Thread Matt Neuburg
On Tue, 14 Jan 2014 11:44:46 -0800, Quincey Morris said: >The size of the cell you get from dequeueReusableCellWithIdentifier is >meaningless until the cell gets added to the table view Yes, but the size of the cell you get from `dequeueReusableCellWithReuseIdentifier:forIndexPath:` is meanin

Re: UIPopoverController and UIToolbar interactions

2014-01-15 Thread Rick Mann
On Jan 14, 2014, at 20:45 , Matt Neuburg wrote: > Another possibility, if you're determined to use a popover segue, is to set > the toolbar `userInteractionEnabled` to NO while the popover is showing. I had initially put checks into the segue handling to prevent multiple popovers (agreed: vil

UIButton over sliding UIImageView disappears until slide complete

2014-01-15 Thread Eric E. Dolecki
I have a UIButton above a series of UIImageViews. At times, the UIImageViews will slide under the button - and they disappear until the animation (UIView) is complete. How can I prevent this and have the button remain in view at all times? Thanks, Eric

Re: What are the conditions for NSManagedObjectContextObjectsDidChangeNotification to get posted?

2014-01-15 Thread Jerry Krinock
Hello Jim, The fact that no one has replied to your post yet confirms my feeling that you’re at the bleeding edge of NSManagedObjectContextObjectsDidChangeNotification usage. Here are a couple of thoughts… • You can generally send -processPendingChanges yourself, whenever you want. Particul

Trying to get a TIFF from a CGImageRef isn't working

2014-01-15 Thread Steve Mills
I've been wrestling with this all day and nothing is working. This code: NSImage* nsImage = [[NSImage alloc] initWithCGImage:cgImage size:NSZeroSize]; NSBitmapImageRep* biRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage]; NSData* nsImageData = [biRep TIFFRe

Re: Trying to get a TIFF from a CGImageRef isn't working

2014-01-15 Thread Kyle Sluder
On Wed, Jan 15, 2014, at 02:14 PM, Steve Mills wrote: > I've been wrestling with this all day and nothing is working. This code: > > NSImage* nsImage = [[NSImage alloc] initWithCGImage:cgImage > size:NSZeroSize]; > NSBitmapImageRep* biRep = [[NSBitmapImageRep alloc] > initWithCGIm

Re: Trying to get a TIFF from a CGImageRef isn't working

2014-01-15 Thread Steve Mills
On Jan 15, 2014, at 16:56:03, Kyle Sluder wrote: > What is the data format of the original CGImageRef? ImageIO might not be > able to write it to TIFF. (It might have too many bits per pixel, or the > values might be in the wrong order, etc.) It should be in the native 3-bit byte order, since it

NSMutableDictionary of NSMutableDictionary copy

2014-01-15 Thread Tamas Nagy
Hi, probably an easy thing, but cannot find an answer till now: I have an NSMutableDictionary which contains a couple of other NSMutableDictionaries, and those probably have other NSMutableDictionaries, and I am thinking about, does a copy of the dictionary make the whole dictionary non-mutable