Hello I am having trouble showing a window. I am sure IBOutlet NSWindow *progressPanel; is connected to the window in interface builder, I am sure mine [progressPanel orderFront:self]; works because I did it for the main window at start up. One thing I'm not sure about is my method to show it and the way I'm calling it with another class.
Here is the way I am calling it with my other class.
#import "Progress.h"

@implementation controller
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
   #pragma unused(notification)
   Progress *progress = [[Progress alloc] init];
[progress showProgressPanel:NO title:@"Downloading" icon:[NSImage imageNamed:@"logo"] info:@"Downloading files"];
   [mainWindow orderFront:self];
}
@end

[mainWindow orderFront:self]; works I see the main window at launch even when I have visible at launch unchecked.

Here is my header for Progress.
#import <Cocoa/Cocoa.h>


@interface Progress : NSObject {
   IBOutlet NSProgressIndicator *progressIndicator;
   IBOutlet NSTextField *info;
   IBOutlet NSImageView *icon;
   IBOutlet NSWindow *progressPanel;
}
- (void)showProgressPanel:(BOOL)indeterminate title:(NSString *)title icon:(NSImage *)iconValue info:(NSString *)infoText;
@end

And here is the Progress class.
#import "Progress.h"


@implementation Progress
- (void)showProgressPanel:(BOOL)indeterminate title:(NSString *)title icon:(NSImage *)iconValue info:(NSString *)infoText {
   [icon setImage:iconValue];
   [info setStringValue:infoText];
   [progressPanel setTitle:title];
   [progressIndicator setIndeterminate:indeterminate];
   [progressIndicator startAnimation:self];
   [progressPanel orderFront:self];
}
@end
If someone can help me figure this out I'll be very grateful. Thanks,

Mr. Gecko
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to