Skip to content

standardWindowButton returns nil #7

@UXDart

Description

@UXDart

Hi! I'm trying to create a window by code:
self = [super initWithContentRect:rect styleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask backing:NSBackingStoreBuffered defer:NO];

and I got an error saying that it was trying to add nil to an array. I found that the problem is in the line:
_standardButtons = @[[self standardWindowButton:NSWindowCloseButton],
[self standardWindowButton:NSWindowMiniaturizeButton],
[self standardWindowButton:NSWindowZoomButton]];

standardWindowButton: is returning nil for all 3 calls. any idea? I'm on 10.10.1

TIA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions