Newbie question: Where did I lose track?
Newbie question: Where did I lose track?
- Subject: Newbie question: Where did I lose track?
- From: Xander Maas <email@hidden>
- Date: Wed, 9 Nov 2005 20:56:06 +0100
Hi all,
I am new to the list and just beginning programming in cocoa.
I have a little question which might be asked before, but I couldn't
find any answer in archives etc. etc.
I want to create a program which connect to a database (postgresql)
and I would like to show a panel with a progressindicator when the
connect info is being send to the database.
I created a class for my login panle/window and a second class for my
progresspanel. I want to reuse that panel for lengthy request to the
database as there are over 40.000 items in a certain table and when I
want to call these, with their relations, it might take a while....
My question is: How can I call the progress window during lengthy
request. I can't get the panel shown up.
This is the interface is the waitPanel class:
@interface XMWaitPanel : NSObject
{
IBOutlet id waitPanel;
IBOutlet id waitPanelProgressIndicator;
}
- (id)waitPanel;
- (id)waitPanelProgressIndicator;
@end
and this is the implementation of it:
#import "XMWaitPanel.h"
@implementation XMWaitPanel
- (id)waitPanel
{
NSLog(@"DEBUG: waitPanel test string");
[waitPanel orderFront:self];
[waitPanelProgressIndicator displayIfNeeded];
return waitPanel;
}
- (id)waitPanelProgressIndicator
{
return waitPanelProgressIndicator;
}
@end
And this is how I call it right now, but no waitpanel shows up (I
have imported the .h for the other class):
- (IBAction)connectToDatabase:(id)sender
{
// first we want to close the loginPanel
[loginPanel close];
// next show the waitPanel and start the progress indicator
XMWaitPanel *myLoginWait = [[XMWaitPanel alloc] init];
[myLoginWaitPanel makeKeyAndOrderFront:self]; // also tried nil
int i;
for ( i=0 ; i < 10000 ; i++ ) {
NSLog(@"DEBUG: LoginWaitProgress sequence %d", i);
}
[myLoginWait release];
}
What am I doing wrong here....
Xander
Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
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