Перейти к содержанию
Fire Monkey от А до Я

fredff13

Пользователи
  • Постов

    1
  • Зарегистрирован

  • Посещение

Достижения fredff13

  1. I created app for both Android and iOS. I need to add dialog to login. I used the simple one like InputQuery with 2 fields. Unfortunately InputQuery does not work on iPhone or simulator. It's just shuts off app silently without error. The code snippet is below: =================================== procedure callUserLogin(sUsername, sPassword: String); var Prompts: TArray<string>; Defaults: TArray<string>; begin Prompts := ['Username:', 'Password:']; Defaults := [sUsername, sPassword]; TDialogServiceAsync.InputQuery('Login', Prompts, Defaults, procedure(const AResult: TModalResult; const AValues: array of string) begin if (AResult = mrOk) then begin // Process AValues[0] (Username) and AValues[1] (Password) sUsername := Trim(AValues[0]); if ((LowerCase(sUsername) = 'genesis') and (AValues[1] = '71962')) then begin LastLoginName := sUserName; Application.Run; end else begin ShowMessage('Invalid credentials. Please try again.'); callUserLogin(sUsername, sPassword); // call itself end; end else Application.Terminate; end); end; =================================== How to fix it? Or what other way to create dialog? I tried to use custom dialog and it does not work with ShowModal even with anonymous method). Create native iOS dialog? PS I can read/write in Russian
×
×
  • Создать...