• 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
Re: Need help for user interface in COCOA + Objective C
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help for user interface in COCOA + Objective C


  • Subject: Re: Need help for user interface in COCOA + Objective C
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 31 Mar 2009 07:46:45 -0700

On Tue, Mar 31, 2009 at 5:40 AM, Mangesh Kute <email@hidden> wrote:
> Hi,
>
> I am using COCOA + Objective C for creating user interface for my application.

"Cocoa"

> I created nib for displaying message to user.
> When I load this nib from main thread, it works fine.
> But when I load it from thread it displays blank white window and
> processor get hogged.

Review the following, in particular the section about AppKit (also
best to read the whole document)...

<http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html#//apple_ref/doc/uid/10000057i-CH12-SW1>

"You should create, destroy, resize, move, and perform other
operations on NSView objects only from the main thread of an
application."

> Can someone please help me?

You should only create view object graphs, etc. from the main thread.
Look at using -[NSObject
performSelectorOnMainThread:withObject:waitUntilDone:].

-Shawn
_______________________________________________

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: Need help for user interface in COCOA + Objective C
      • From: Lyndsey Ferguson <email@hidden>
References: 
 >Need help for user interface in COCOA + Objective C (From: Mangesh Kute <email@hidden>)

  • Prev by Date: Re: Need help for user interface in COCOA + Objective C
  • Next by Date: Thanks!
  • Previous by thread: Re: Need help for user interface in COCOA + Objective C
  • Next by thread: Re: Need help for user interface in COCOA + Objective C
  • Index(es):
    • Date
    • Thread