PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV Mobile 24 → Loading local html content into html control
Loading local html content into html control
Iniciado por Gary James, nov., 16 2014 12:30 PM - 4 respostas
Publicado em novembro, 16 2014 - 12:30 PM
Hello all,

I am evaluating WinDev Mobile. I am trying to include a local html file (test.htm) with my Android app, and then load that file into an html control.

I have included the test.htm file under my product "Documents". And have tried all of the following code behind buttons in my app:

HTM_Html1 = fDataDir() + "\test.htm"
HTM_Html1 = fDataDir() + "\Documents\test.htm"
HTM_Html1 = fExeDir() + "\test.htm"
HTM_Html1 = fExeDir() + "\Documents\test.htm"

None of those are working.

How do I do this? There is very little information that I can find in the documentation and / or examples.

Appreciated,

Gary.
Membro registado
2.949 mensagems
Popularité : +89 (91 votes)
Publicado em novembro, 17 2014 - 12:54 PM
PROCEDURE DB_Diretorios()

ok is boolean = False

//Verifica
IF InSimulatorMode() = False THEN

gsDirTempPhotos = gsAppDir + ["/"] + "VideosFotos/"
gsArquivosTXT = gsAppDir + ["/"] + "Arquivos/"
gsAutorunPath = gsAppDir + ["/"] + "Arquivos/autorun.ini"

gsAppDir = "/mnt/sdcard/TaxiFv/"
IF fDirectoryExist(gsAppDir) = False THEN
ok = fMakeDir(gsAppDir)
END


IF INIRead("Camera","DiretorioRaiz","",gsAutorunPath) <> ""
gsAppDir = INIRead("Camera","DiretorioRaiz","",gsAutorunPath)
END

IF fDirectoryExist(gsAppDir) = False THEN
ok = fMakeDir(gsAppDir)
END

IF fDirectoryExist(gsAppDir) = False AND INIRead("Camera","DiretorioRaiz","",gsAutorunPath) = ""
gsAppDir = "/mnt/sdcard/TaxiFv/"
fMakeDir(gsAppDir)
END

IF gsAppDir = ""
gsAppDir = "/sdcard/TaxiFv/"
fMakeDir(gsAppDir)
END

IF fDirectoryExist(gsDirTempPhotos) = False THEN
ok = fMakeDir(gsDirTempPhotos)
IF ok = False THEN
gsDirTempPhotos = gsAppDir + ["/"] + "VideosFotos/"
fMakeDir(gsDirTempPhotos)
END
END

IF fDirectoryExist(gsAppDir + ["/"] + "Arquivos/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Arquivos/")
END

IF fDirectoryExist(gsAppDir + ["/"] + "Agenda/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Agenda/")
END

IF fDirectoryExist(gsAppDir + ["/"] + "Install/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Install/")
END

IF NOT fDirectoryExist(gsAppDir) THEN
fMakeDir(gsAppDir)
END

DirDb is string = gsAppDir + ["/"] + "DB/"
IF NOT fDirectoryExist(DirDb) THEN
fMakeDir(DirDb)
END

Arquivos is string = gsAppDir + ["/"] + "Arquivos/"
IF NOT fDirectoryExist(Arquivos) THEN
fMakeDir(Arquivos)
END

Notas is string = gsAppDir + ["/"] + "Notas/"
IF NOT fDirectoryExist(Notas) THEN
fMakeDir(Notas)
END

VideosFotos is string = gsAppDir + ["/"] + "VideosFotos/"
IF NOT fDirectoryExist(VideosFotos) THEN
fMakeDir(VideosFotos)
END

backup is string = gsAppDir + ["/"] + "Backup/"
IF NOT fDirectoryExist(backup) THEN
fMakeDir(backup)
END

Temprestore is string = gsAppDir + ["/"] + "Restore/"
IF NOT fDirectoryExist(Temprestore) THEN
fMakeDir(Temprestore)
END


ELSE

gsAppDir = "c:\Temp"
gsDirTempPhotos = "c:\Temp\VideosFotos"
gsArquivosTXT = "c:\Temp\Arquivos"
gsAutorunPath = "c:\Temp\Arquivos\autorun.ini"

Dirarq is string = "c:\Temp\Arquivos"
IF NOT fDirectoryExist(Dirarq) THEN
fMakeDir(Dirarq)
END

DirDbs is string = "c:\Temp\DB\"
IF NOT fDirectoryExist(DirDbs) THEN
fMakeDir(DirDbs)
END

Dirvf is string = "c:\Temp\VideosFotos"
IF NOT fDirectoryExist(Dirvf) THEN
fMakeDir(Dirvf)
END

Dirnotas is string = "c:\Temp\Notas"
IF NOT fDirectoryExist(Dirnotas) THEN
fMakeDir(Dirnotas)
END

Dirbkp is string = "c:\Temp\Backup"
IF NOT fDirectoryExist(Dirbkp) THEN
fMakeDir(Dirbkp)
END

Dirres is string = "c:\Temp\Restore"
IF NOT fDirectoryExist(Dirres) THEN
fMakeDir(Dirres)
END

END
Membro registado
2.949 mensagems
Popularité : +89 (91 votes)
Publicado em novembro, 17 2014 - 12:54 PM
PROCEDURE LE_ASCII(LOCAL ArquivoTxt)

//Le arquivo texto

// Declare the variables
PathFile is string = ArquivoTxt
IdFile, ResCloseFile, FileID, NumeroLinha is int
Line is string

// Open the file
FileID = fOpen(PathFile,foReadWrite)
IF IdFile = -1 THEN
Error(ErrorInfo(errMessage))
ELSE

//Converte de Unicode para Ansi
Line = UnicodeToAnsi(fReadLine(FileID))

//Linha 1
NumeroLinha = 1
//Info("Linha:" + NumeroLinha, Line)

WHILE Line <> EOT AND Line <> ""

//Proxima linha
NumeroLinha += 1
Line = fReadLine(FileID)
//Info("Linha:" + NumeroLinha, Line)

END
IF Line = "" THEN Error(ErrorInfo(errMessage))
IF Line = EOT THEN Info("Final do Arquivo.")
ResCloseFile = fClose(IdFile)
IF ResCloseFile = -1 THEN
//Error(ErrorInfo(errMessage))
END

END
Membro registado
2.949 mensagems
Popularité : +89 (91 votes)
Publicado em novembro, 17 2014 - 12:55 PM
Pass me your email to send you a sample
Publicado em agosto, 22 2019 - 6:33 PM
Bonjour,
Voila mon Mail: amisolo77@gmail.com