Seems I’m having some growing pains associated with the Xcode 8 beta and 64bit migration. In searching I’ve found a few related questions but not one specifically related to solving an ‘NSInteger' (aka 'long') to 'CGSWindow' (aka 'int') error.
Anyone here know how to get it going the right way round?
here's an example:
#import <Cocoa/Cocoa.h>
@interface CustomWindow : NSWindow {
// this point is used in dragging to mark the initial click location
NSPoint initialLocation;
}
@property (assign) NSPoint initialLocation;
@end
#import "CustomWindow.h"
#import <AppKit/AppKit.h>
@implementation CustomWindow
@synthesize initialLocation;
/*
In Interface Builder, the class for the window is set to this subclass. Overriding the initializer
provides a mechanism for controlling how objects of this class are created.
*/
- (id)initWithContentRect:(NSRect)contentRect
styleMask:(NSUInteger)aStyle
backing:(NSBackingStoreType)bufferingType
defer:(BOOL)flag {
// Using NSBorderlessWindowMask results in a window without a title bar.
self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
if (self != nil) {
// Start with no transparency for all drawing into the window
[self setAlphaValue:1.0];
// Turn off opacity so that the parts of the window that are not drawn into are transparent.
[self setOpaque:NO];
}
return self;
}