Dinkin Posted January 24, 2023 Share Posted January 24, 2023 Доброго! Делаю как у вас в примере: if(UniSweetAlert1->Execute()) { String group_name = UniSweetAlert1->InputResult; ShowMessageN(group_name); } Компилятор выдает ошибку, что метод заблокирован. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 24, 2023 Share Posted January 24, 2023 26 minutes ago, Dinkin said: Компилятор выдает ошибку, что метод заблокирован. Добрый день, Я не смог воспроизвести ошибку. Quote Link to comment Share on other sites More sharing options...
Dinkin Posted January 24, 2023 Author Share Posted January 24, 2023 Возможно какие то свойства родительских форм влияют?. Вот весь код (Code к нему выдает ошибку, потому просто как текст): //--------------------------------------------------------------------------- void __fastcall TMainForm::UniButton1Click(TObject *Sender) { UniSweetAlert1->AlertType = atQuestion;//atSuccess; // atQuestion; UniSweetAlert1->InputType = ItText; UniSweetAlert1->Title = L"Test"; UniSweetAlert1->ConfirmButtonColor = clWebMediumTurquoise; if(UniSweetAlert1->Execute()) { String group_name = UniSweetAlert1->InputResult; ShowMessageN(group_name); } } //--------------------------------------------------------------------------- Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 24, 2023 Share Posted January 24, 2023 А если так? ShowMessageN(UniSweetAlert1->InputResult); Quote Link to comment Share on other sites More sharing options...
Dinkin Posted January 24, 2023 Author Share Posted January 24, 2023 Выдает пустое значение. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 24, 2023 Share Posted January 24, 2023 36 minutes ago, Dinkin said: Выдает пустое значение. Вообще input появляется, Вы что-то там вводите? Если Вы заметили, в демо примере, применяется этот "конфиг" перед показом... procedure TMainForm.ConfigSweetAlert(const ShowLoader: Boolean = False); begin with UniSweetAlert1 do begin AlertType := TAlertType(UniComboBox1.ItemIndex); AllowEscapeKey := UniCheckBox1.Checked; AllowOutsideClick := UniCheckBox2.Checked; CancelButtonText := UniEdit1.Text; ConfirmButtonText := UniEdit2.Text; ShowCancelButton := UniCheckBox3.Checked; ShowCloseButton := UniCheckBox4.Checked; ShowLoaderOnConfirm := ShowLoader; Title := UniEdit3.Text; if UniCheckBox6.Checked then //<-------------- begin InputType := ItText; //<-------------- InputValue := UniEdit4.Text; end else InputType := ItNone; end; end; Quote Link to comment Share on other sites More sharing options...
Dinkin Posted January 24, 2023 Author Share Posted January 24, 2023 Да, я вроде все так же перевел из delphi на builder. Но в примере окно вызывается через Execute, у меня даже просто эта команда выдает ошибку void __fastcall TMainForm::UniButton1Click(TObject *Sender) { UniSweetAlert1->Execute(); } Quote Link to comment Share on other sites More sharing options...
Dinkin Posted January 24, 2023 Author Share Posted January 24, 2023 А вот что выдает браузер Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.