Window not showing
Window not showing
- Subject: Window not showing
- From: "Mr. Gecko" <email@hidden>
- Date: Tue, 11 Mar 2008 18:16:06 -0500
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 (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