NSBeginAlertSheet me donne une NSRunAlertPanel !
muqaddar
Administrateur
Salut,
Tout est dans le titre, j'ai une fonction basée sur NSBeginAlertSheet et je me retrouve avec une classique boà“te d'alerte et non une feuille !
- (IBAction)deleteSite:(id)sender
{
NSString *title = @Attention!;
NSString *defaultButton = @Supprimer;
NSString *alternateButton = @Ne pas supprimer;
NSString *otherButton = nil;
NSString *message = @Etes-vous s?rs de vouloir supprimer les lignes sélectionnés ?;
if ([tableViewSites numberOfSelectedRows] == 0)
return;
NSBeep();
NSBeginAlertSheet(title, defaultButton, alternateButton, otherButton, mainWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), nil, nil, message);
}
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
//mon code
}
Plutôt étonnant non ?
Tout est dans le titre, j'ai une fonction basée sur NSBeginAlertSheet et je me retrouve avec une classique boà“te d'alerte et non une feuille !
- (IBAction)deleteSite:(id)sender
{
NSString *title = @Attention!;
NSString *defaultButton = @Supprimer;
NSString *alternateButton = @Ne pas supprimer;
NSString *otherButton = nil;
NSString *message = @Etes-vous s?rs de vouloir supprimer les lignes sélectionnés ?;
if ([tableViewSites numberOfSelectedRows] == 0)
return;
NSBeep();
NSBeginAlertSheet(title, defaultButton, alternateButton, otherButton, mainWindow, self, @selector(sheetDidEnd:returnCode:contextInfo:), nil, nil, message);
}
- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
//mon code
}
Plutôt étonnant non ?
Connectez-vous ou Inscrivez-vous pour répondre.
Réponses
Tout marche maintenant.