Re: App fails on Yosemite - "Cannot remove an observer"
Re: App fails on Yosemite - "Cannot remove an observer"
- Subject: Re: App fails on Yosemite - "Cannot remove an observer"
- From: Andreas Höschler <email@hidden>
- Date: Mon, 01 Dec 2014 19:41:08 +0100
Hi Jerry and all,
>> You should look for … overrides of superclass properties
>
> Yes, indeed. Search for the AppKit Release Notes for OS X 10.10 Yosemite and carefully read the section on tab views, wherein Apple has added alot of new stuff, which may be stepping on your old stuff.
Thanks!
Adding
#ifdef __APPLE__
- (void)setWindow:(NSWindow *)window
{
}
#endif
to my GSScrollView : NSScrollView subclass fixed (or at least worked around) the issue (no exception anymore and no apparent malfunction of the app).
I searched for API changes and found:
Removed -[NSScrollView autohidesScrollers]
Removed -[NSScrollView backgroundColor]
Removed -[NSScrollView borderType]
Removed -[NSScrollView contentSize]
Removed -[NSScrollView contentView]
...
Added NSScrollView.autohidesScrollers
Added NSScrollView.automaticallyAdjustsContentInsets
Added NSScrollView.backgroundColor
Added NSScrollView.borderType
Added NSScrollView.contentInsets
Added NSScrollView.contentSize
Added NSScrollView.contentView
...
What the heck does that mean? How can they remove these access methods? No idea what this NSScrollView.autohidesScrollers stuff is all about. This does not even look like Objective-C anymore!? Will they remove the message sending idea of Objective-C all together in the next release? :-(
This is my GSScrollViewClass:
@interface GSScrollView : NSScrollView
{
NSSize _minSize;
}
- (id)initWithFrame:(NSRect)frame;
- (BOOL)acceptsFirstMouse:(NSEvent *)theEvent;
- (void)setFrame:(NSRect)rect;
- (void)setMinSize:(NSSize)size;
- (NSSize)minimumSizeForContent;
- (void)callSizeToFitOnTableViews;
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender
- (unsigned int)draggingUpdated:(id <NSDraggingInfo>)sender;
- (void)draggingExited:(id <NSDraggingInfo>)sender;
- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender;
and this is GSWindow:
@interface GSWindow : NSWindow
{
BOOL _suppressBecomingMainWin;
GSWindow *mainWin;
id filesOwner;
NSRect _tempRect;
}
+ (void)relayoutContentView:(NSView < GSBoxProtocol > *)contentView
- (GSWindow *)mainWin;
- (id)filesOwner;
- (void)close;
- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
- (void)setCanBecomeMainWindow:(BOOL)flag;
- (BOOL)canBecomeMainWindow;
- (void)open;
- (BOOL)validateMenuItem:(NSMenuItem *)aMenuItem;
- (void)relayout;
- (void)setFrame:(NSRect)frameRect display:(BOOL)flag
I have not subclassed NSTabView. Is this now a bug in Apples
NSScrollView::setWindow:
method? Does this ring any bells? I can't see any "stepping on Apples API" problem!? :-(
Thanks a lot,
Andreas
_______________________________________________
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