views:

28

answers:

1

I want to override initWithContentRect on a subclassed NSWindow, as I've seen done in Obj-C, in order to create a borderless window from a nib.

If I try this:

class GroupWindow < NSWindow
def initWithContentRect(contentRect, styleMask:windowStyle, backing:bufferingType, defer:deferCreation)
    super.initWithContentRect(
        contentRect,
        styleMask:NSBorderlessWindowMask,
        backing:bufferiMacngType,
        defer:deferCreation)
end
end

Then it terminates with EXC_BAD_ACCESS

If I try this:

    def initWithContentRect(contentRect, styleMask:windowStyle, backing:bufferingType, defer:deferCreation)
    super(
        contentRect,
        styleMask:NSBorderlessWindowMask,
        backing:bufferingType,
        defer:deferCreation)
end

Then it just exits with return code 1.

+2  A: 

You should do:

super(contentRect, NSBorderlessWindowMask, bufferingType, deferCreation)

lrz