Skip navigation.
 
mlTrouble opening a nib
FROM : Ken Tozier
DATE : Sat Apr 09 21:47:48 2005

Hi all,

I wrote a small app which performs specialized photo downloads from a
camera and have the actual downloading mechanism working fine, problem
is, I can't seem to get the progress bar dialog to display and am a bit
confused about how to do it.

The progress bar nib is in it's own nib file called
"DownloadProgress.nib"

There is also a "Downloader" class defined as a subclass of
"NSWindowController"

The init method for the downloader class is defined like so:

- (id) init
{
   self = [super initWithWindowNibName: @"DownloadProgress"];
   
   /* other initialization here */

   return self;
}

When the app gets a "device connected" message, it creates an instance
of the "Downloader" class in it's "handleDeviceConnection" method like
so:

- (void)
handleDeviceConnectedNotification:(ICARegisterEventNotificationPB *)
inNotification
{
   Downloader        *downloadWindow        = [[Downloader alloc] init];
   
   /* next line doesn't display the window but doesn't crash either */
   [downloadWindow showWindow: self];    

   /* despite failure of previous line, next line executes as expected */
   [downloadWindow downloadAllPhotos];
}

Anyone see what I'm doing wrong?

Thanks,

Ken

Related mailsAuthorDate
No related mails found.