MyShadow was deallocated while key value observers...
MyShadow was deallocated while key value observers...
- Subject: MyShadow was deallocated while key value observers...
- From: Leonardo <email@hidden>
- Date: Fri, 27 Jun 2014 22:21:36 +0200
- Thread-topic: MyShadow was deallocated while key value observers...
While the user moves the selection within an NSTextView, I show on the UI
the values of the current textShadow: offsetX, offsetY and blur. In each
textField on IB, I bind, e.g.
oObjsArrayController.selection.textShadow.offsetX
So, in the textView's method textViewDidChangeSelection I do
attr = [self.textStorage attributesAtIndex:loc effectiveRange:effRange];
self.textShadow = [attr objectForKey:MyShadowAttributeName];
textShadow is never retained. It's just a pointer that I set to nil or to
the current selected shadow, as above, just to show the current selected
shadow values. On the header, it looks
@property (nonatomic, assign) MyShadow *textShadow;
Sometimes, when I create a new shadow or I release the textView I get this
bug:
MyShadow was deallocated while key value observers were still registered
with it...
Why? I can't find a solution to this bug.
Regards
-- Leonardo
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden