[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Notifications in modal loops
From: |
Andreas Höschler |
Subject: |
Notifications in modal loops |
Date: |
Thu, 8 Feb 2007 18:21:15 +0100 |
Hi all,
I have a custom panel with some textfields that I would like to run
modal.
- (NSPrintInfo *)runForFile:(NSString *)path numberOfPages:(int)pages
{
// Setting up the ui elements
[fromField setDelegate:self];
[toField setDelegate:self];
if ([NSApp runModalForWindow:mainWin] == NSRunStoppedResponse)
{
// do something useful
}
else return nil;
}
- (void)textDidChange:(NSNotification *)aNotification
{
NSLog(@"textDidChange...");
// do something useful
}
The problem is that the delegate method textDidChange: is not called
while the panel is displayed (when entering text in the text fields).
Any idea why? I suppose that has to do with the modal loop and would
most likely work if I did not use runModalForWindow: but [mainWin
orderFront:]. But I want this dialog to be modal.
What can I do?
Thanks,
Andreas
- Notifications in modal loops,
Andreas Höschler <=