mobileControlCreate input mehrere Felder möglich?

Startseite Foren Deutsches LiveCode-Forum mobileControlCreate input mehrere Felder möglich?

Ansicht von 2 Antwort-Themen
  • Autor
    Beiträge
    • #7108
      Krissy
      Teilnehmer

        Hallo Leute,

        ich hab ein Problem mit dem Befehl mobileControlCreate unter Android.
        Ich möchte zwei Texteingabefelder haben, es wird aber immer nur eins angelegt.
        Es wird nur das erste Feld erstellt, das zweite aber nicht. Wenn ich das createInput auskommentiere wird nur das zweite Feld erzeugt, aber natürlich das erste nicht.

        Es muss doch möglich sein mehrere Felder anzulegen, also hab ich iwo einen Fehler eingebaut.

        
        on openCard   
           if the environment is "mobile" then
              createInput
              createInput2
           end if
        end openCard
        
        on createInput
           mobileControlCreate "input", "inputName"
           mobileControlSet "inputName", "rect", "96,306,309,340"
           mobileControlSet "inputName", "visible", true
           mobielControlSet "inputName", "opaque", true
        end createInput
        
        on createInput2
           mobileControlCreate "input", "inputPw"
           mobileControlSet "inputPw", "rect", "96,345,309,375"
           mobileControlSet "inputPw", "visible", true
           mobielControlSet "inputPw", "opaque", true
        end createInput2
        
        on keyboardActivated
           set the rect of graphic "InputRect" to "96,86,309,120"
           mobileControlSet "inputName", "rect", "96,86,309,120"
           
           set the rect of graphic "InputRectPW" to "96,106,309,155"
           mobileControlSet "inputPW", "rect", "96,106,309,155"
        end keyboardActivated
        
        on keyboardDeactivated
           set the rect of graphic "InputRect" to "96,306,309,340"
           mobileControlSet "inputName", "rect", "96,306,309,340"
           
           set the rect of graphic "InputRectPW" to "96,345,309,375"
           mobileControlSet "inputPW", "rect", "96,345,309,375"
           
        end keyboardDeactivated
        
        on closeCard
           if the environment is "mobile" then
              mobileControlDelete "inputName"
              mobileControlDelete "inputPw"
           end if
        end closeCard
        

        Ich bin grad nen bissle am verzweifeln. Vielen Dank schonmal für eure Hilfe.

        Liebe Grüße
        Krissy

      • #7110
        Krissy
        Teilnehmer

          Okay wer lesen und schreiben kann ist klar im Vorteil.

          Ich hab stundenlang auf den Code gestarrt, so viel hin und her probiert, aber der Schreibfehler beim dritten mobileControlSet ist mir eben erst aufgefallen.

          Jetzt klappt es auch mit dem zwei Feldern =D

        • #7127
          Klaus Major
          Verwalter

            Hi Krissy,

            schön, daß das Forum wieder einmal helfen konnte! 😀

            Gruß

            Klaus

        Ansicht von 2 Antwort-Themen
        • Du musst angemeldet sein, um auf dieses Thema antworten zu können.