Antwort auf: Speichern von Daten

Startseite Foren Deutsches LiveCode-Forum Speichern von Daten Antwort auf: Speichern von Daten

#6538
YoloBolo
Teilnehmer
    global tZielPfad
    
    on preOpenStack
       set the fullscreenmode of me to "Letterbox"
    end preOpenStack
    
    on openstack
       go to cd"Home"
       if the environment = "mobile" then
          put specialfolderpath("documents") into tZielPfad
       else
          put specialfolderpath("preferences") into tZielPfad
       end if
       put "/Anlagen/Test.txt" after tZielPfad
       dateneinlesen
    end openstack
    
    on mouseup
       if "button" is in the target then
          put the name of the target into btntitel
          put word 2 of btntitel into action
          delete the first char of action
          delete the last char of action
          if action = "Daten speichern"then
             go to cd"Test"
          else if action = "Speichern" then
             put fld "Eingabe" into worte
             put empty into fld "Eingabe"
             put worte &return after fld "Speicherort"
             put worte into url("file:" & tZielPfad)
          end if
       end if
    end mouseup
    
    on dateneinlesen
       if there is a file tZielPfad then
          put url("file:" & tZielPfad) into worte
          put worte into fld "Speicherort" of cd "Test"
       end if
    end dateneinlesen

    Habe das nochmal in einem Testprojekt probiert