• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
orderFront: 10.10 vs 10.9
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

orderFront: 10.10 vs 10.9


  • Subject: orderFront: 10.10 vs 10.9
  • From: Torsten Curdt <email@hidden>
  • Date: Fri, 08 May 2015 13:44:05 +0200

I am staring at this code and don't get why it works fine under 10.10 while
under 10.9 it does not.

        NSScreen *screen = self.window.screen;
        NSWindow *overlay = [[NSWindow alloc]
initWithContentRect:screen.frame

styleMask:NSBorderlessWindowMask

backing:NSBackingStoreBuffered
                                                            defer:NO];
        self.instructionsWindow = overlay; // strong reference
        overlay.opaque = NO;
        overlay.ignoresMouseEvents = NO;
        overlay.level = NSFloatingWindowLevel - 1;
        overlay.backgroundColor = [NSColor colorWithCalibratedWhite:0.0
alpha:0.6];

        InstructionsView *view = [[InstructionsView alloc]
initWithFrame:overlay.frame];

        view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
        view.wantsLayer = YES;

        overlay.contentView = view;
        // [overlay.contentView addSubview:view];

        InstructionsButton *button = [[InstructionsButton alloc]
initWithFrame:NSMakeRect(120, 45, 172, 44)];
        [button setTitle:@"Done"];
        [button setTarget:self];
        [button setAction:@selector(actionInstructions:)];
        [view addSubview:button];

        NSLog(@"to front");
        [overlay orderFront:nil];
        // [overlay makeKeyAndOrderFront:nil];
        NSLog(@"in front");

On 10.9 I am seeing

  "unlockFocus called too many times. Called on <InstructionView>
  Unlocking Focus on wrong view

I am getting no window and not even "in front" in the console.

The focus thing is strange, too. The code is actually generated by
PaintCode (for 10.9+) and there are no problem on 10.10.

Any pointers? I am running out of ideas.

cheers,
Torsten
_______________________________________________

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


  • Follow-Ups:
    • Re: orderFront: 10.10 vs 10.9
      • From: sqwarqDev <email@hidden>
  • Prev by Date: Re: Where and how do I know a save completed successfully?
  • Next by Date: Re: orderFront: 10.10 vs 10.9
  • Previous by thread: Re: Where and how do I know a save completed successfully?
  • Next by thread: Re: orderFront: 10.10 vs 10.9
  • Index(es):
    • Date
    • Thread