{
struct algstate *state = (struct algstate *)ctx;
- state->callback(state->ctx, result == 0);
+ state->callback(state->ctx, result == NSAlertFirstButtonReturn);
sfree(state);
}
state->callback = callback;
state->ctx = ctx;
- alert = [NSAlert alloc];
+ alert = [[NSAlert alloc] init];
[alert setInformativeText:[NSString stringWithCString:text]];
[alert addButtonWithTitle:@"Yes"];
[alert addButtonWithTitle:@"No"];