Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Delphi [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder' (https://www.delphipraxis.net/191007-%5Bfmx-ios%5D-dyld_sim-einvalidoperation-nicht-unterstuetzte-inputquery-felder.html)

Devil1925 29. Nov 2016 10:37

[FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
Guten Morgen / Mittag!
Ich habe folgendes Phänomen. Wenn ich eine InputQuery erzeugen möchte und das Als Loginfenster mache, funktioniert alles.

Delphi-Quellcode:
InputQuery('Anmeldung', ['Name', #1'Passwort'], ['', ''],
      procedure(const AResult: TModalResult; const AValues: array of string)
        begin
          if AResult = mrOk then
            Begin
              //für das Problem unwichtiger Code
            end;
        end
      );
jetzt versuche ich eine Ähnliche Inputquery zu machen,
Delphi-Quellcode:
InputQuery('Anmeldung', ['Name', 'Passwort'], ['', ''],
      procedure(const AResult: TModalResult; const AValues: array of string)
        begin
          if AResult = mrOk then
            Begin
              //für das Problem unwichtiger Code
            end;
        end
      );
und falle auf die Schnauze. Meldung:
Code:
 Im Projekt dyld_sim ist eine Exception der Klasse EInvalidOperation mit der Meldung 'Nicht unterstützte InputQuery-Felder' aufgetreten.
der einzige Unterschied ist das #1 bei der Ersten InputQuery, welches das 2. Feld zu einem "masked Field" macht. Lasse ich dies weg, funktioniert es nicht mehr. Hat da jemand eine Idee/Abhilfe?

Das Problem tritt auch nur bei iOS auf, auf Android funktioniert alles einwandfrei.

Devil1925 30. Nov 2016 12:49

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
*push*

Devil1925 13. Dez 2016 07:51

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
weiss hier keiner weiter? oder hat vielleicht eine Idee wo ich alternativ fragen könnte? oder generell eine idee was man da versuchen könnte?

bra 13. Dez 2016 11:26

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
Funktioniert das, wenn die Felder anders heißen, z.B. "a" und "b"? Vielleicht prüft iOS selbst, ob ein "Passwort"-Feld maskiert ist?

DeddyH 13. Dez 2016 11:33

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
Schau doch mal in die FMX.Dialogs.iOS.pas (TCocoaDialogsService.CreateAlertView):
Zitat:

Delphi-Quellcode:
function IsPassword(const Prompt: string): Boolean;
  begin
    Result := (Prompt.Length > 0) and (Prompt.Chars[0] < #32);
  end;

...

  if (LPromptsLength > 2) or ((LPromptsLength = 2) and not (IsPassword(APrompts[1]) and
    (not IsPassword(APrompts[0])))) then
    raise EInvalidOperation.Create(SUnsupportedInputQuery);


Devil1925 13. Dez 2016 14:07

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
Der Name des Feldes ist egal, ich kann das Feld auch "Hammlet" nennen, das macht keinen Unterschied.

Devil1925 28. Mär 2017 11:01

AW: [FMX-iOS] dyld_sim EInvalidOperation 'Nicht unterstützte InputQuery-Felder'
 
Zitat:

Zitat von DeddyH (Beitrag 1355985)
Schau doch mal in die FMX.Dialogs.iOS.pas (TCocoaDialogsService.CreateAlertView):
Zitat:

Delphi-Quellcode:
function IsPassword(const Prompt: string): Boolean;
  begin
    Result := (Prompt.Length > 0) and (Prompt.Chars[0] < #32);
  end;

...

  if (LPromptsLength > 2) or ((LPromptsLength = 2) and not (IsPassword(APrompts[1]) and
    (not IsPassword(APrompts[0])))) then
    raise EInvalidOperation.Create(SUnsupportedInputQuery);


Heisst also so viel wie: "Man darf bei iOS keine InputQuery mit mehreren Feldern machen."

Hat da jemand eine Idee, wie ich das dann am besten umgehe? weil das wäre die "schönste" möglichkeit gewesen. Ist es Sinnvoll das Teil quasi selber zu basteln? oder gibt es das schon irgendwo? oder doch lieber einen ganz anderen Ansatz?


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:18 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz