• 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: Launched window not activating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launched window not activating


  • Subject: Re: Launched window not activating
  • From: Ken Tozier <email@hidden>
  • Date: Mon, 11 Apr 2005 21:51:09 -0400

Sorry to keep beating this issue, but there is something fundamentally wrong somewhere in the following six steps and I'm just not experienced enough with Cocoa GUI stuff to see it. To me, the algorithm looks fine, but there is some subtle thing that Cocoa doesn't like.

The problem is that the window generated in step 6.A and displayed in 6.B is never frontmost and can't even be forced to front by clicking on it. The only way to bring it to front is to put the window load code inside a thread (which I'm told is bad for GUI stuff) Even when it's placed in a thread, it doesn't become frontmost without manually clicking on it.

Anyone see the error?

Thanks

Ken

Sequence of events:
--------------------------------
1. Application opens "main" nib

2. "AppController" instance inside "main" nib initializes it's "downloader" instance

	- (id) init
	{
		self = [super init];
		if (self)
		{
			downloader		= [[ICADownloader alloc] init];
		}

		return self;
	}

3. Downloader instance registers for camera connect events in it's "init" method


- (id) init { self = [super init]; if (self) { [self registerForCameraConnectNotifications]; } return self; }


4. Time passes

5. User plugs in a camera

6. Downloader receives camera connect notification and performs following actions:

A. Creates a new window by loading the "DownloadWindow" nib file using NSWindowController with an owner of "self".
B. Displays the window.
C. Downloads photos to a specified directory.
D. Closes window.


7. Done/Waits for another camera connect event.


Hierarchically, the location of the window create code is

App
{
   Main Nib
   {
      AppController
      {
         downloader
         {
            handleCameraConnect <- (callback method)
            {
               NSWindowController	*wind
            }
         }
      }
   }
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Launched window not activating
      • From: Charilaos Skiadas <email@hidden>
References: 
 >Re: Launched window not activating (From: Lorenzo <email@hidden>)
 >Re: Launched window not activating (From: Ken Tozier <email@hidden>)
 >Re: Launched window not activating (From: j o a r <email@hidden>)

  • Prev by Date: Re: WWDC2k5 and ROI
  • Next by Date: [OT] Need a dev. for a project
  • Previous by thread: Re: Launched window not activating
  • Next by thread: Re: Launched window not activating
  • Index(es):
    • Date
    • Thread