• 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
NSWindow in threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindow in threads


  • Subject: NSWindow in threads
  • From: Mattias Jansson <email@hidden>
  • Date: Tue, 26 May 2009 11:51:32 +0200 (CEST)


I'm trying to create a window from code in a thread created with NSThread detachNewThreadSelector:toTarget:withObject


The main thread simply calls NSApplicationMain

The window is created with
[[NSWindow alloc] initWithContentRect:rect styleMask:(NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask) backing:NSBackingStoreRetained defer:YES]


The window has an empty view set with
setContentView:[[NSView alloc] initWithFrame:[window contentRectForFrameRect:[window frame]]


However, the titlebar is not redrawn correctly, and the standard buttons (zoom, close) does not redraw their active states when mouse moves over them but remain greyed out. They do respond to click events though.

I've been reading the API docs but I can't figure out what I've missed in order to get the window drawing the title bar correctly. Any ideas?

_______________________________________________

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: NSWindow in threads
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Underlining a Tab item label
  • Next by Date: Re: String Comparison and return values
  • Previous by thread: Re: Displaying a number with Quartz
  • Next by thread: Re: NSWindow in threads
  • Index(es):
    • Date
    • Thread