FROM : Yann Bizeul
DATE : Sun Nov 03 21:47:55 2002
Hi there,
I have a little problem using alert sheet : All works fine but when I
clic "OK" to close the sheet, the window does not seem to come back in
front, their buttons are gray, and the textField I just hilighted is
gray.
It seems makeKeyAndOrderFront does not activate the window ? Or this
action occures before the sheet is closed, but it should not...
Thanks !
if ([ tunnelNames itemWithTitle: [ tunnelName stringValue ]] !=
nil )
{
NSBeginAlertSheet(
NSLocalizedString(@"This tunnel name already
exists",@"Errors"),
// sheet message
@"OK", // default button label
nil, // alternate button label
nil, // no third button
prefWindow, // window sheet is attached
to
self, // we'll be our own delegate
@selector(sheetDidEnd:returnCode:contextInfo:),
// did-end selector
NULL, // no need for did-dismiss
selector
nil, // context info
@"",
// additional text
nil);
return;
}
- (void)sheetDidEnd: (NSWindow*)sheet returnCode: (int)returnCode
contextInfo: (void*)contextInfo
{
[ prefWindow makeKeyAndOrderFront: self ];
[ tunnelName selectText:self ];
}
--
Yann BIZEUL
LINAGORA
30, rue Saint-Augustin
75002 Paris
Til. 01 58 18 68 35
Std. 01 58 18 68 28
Mob. 06 60 43 00 88
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Sun Nov 03 21:47:55 2002
Hi there,
I have a little problem using alert sheet : All works fine but when I
clic "OK" to close the sheet, the window does not seem to come back in
front, their buttons are gray, and the textField I just hilighted is
gray.
It seems makeKeyAndOrderFront does not activate the window ? Or this
action occures before the sheet is closed, but it should not...
Thanks !
if ([ tunnelNames itemWithTitle: [ tunnelName stringValue ]] !=
nil )
{
NSBeginAlertSheet(
NSLocalizedString(@"This tunnel name already
exists",@"Errors"),
// sheet message
@"OK", // default button label
nil, // alternate button label
nil, // no third button
prefWindow, // window sheet is attached
to
self, // we'll be our own delegate
@selector(sheetDidEnd:returnCode:contextInfo:),
// did-end selector
NULL, // no need for did-dismiss
selector
nil, // context info
@"",
// additional text
nil);
return;
}
- (void)sheetDidEnd: (NSWindow*)sheet returnCode: (int)returnCode
contextInfo: (void*)contextInfo
{
[ prefWindow makeKeyAndOrderFront: self ];
[ tunnelName selectText:self ];
}
--
Yann BIZEUL
LINAGORA
30, rue Saint-Augustin
75002 Paris
Til. 01 58 18 68 35
Std. 01 58 18 68 28
Mob. 06 60 43 00 88
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Yann Bizeul | Nov 3, 21:47 | |
| Stéphane Sudre | Nov 4, 11:27 | |
| Yann Bizeul | Nov 4, 22:40 | |
| matt neuburg | Nov 5, 16:13 | |
| Christopher Corbel… | Nov 5, 18:29 | |
| matt neuburg | Nov 7, 17:33 |






Cocoa mail archive

