Problem to show Readme file to a log box

Find quick help here to get you started with Hollywood
Post Reply
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Problem to show Readme file to a log box

Post by papiosaur »

Hello,

if transform a readme files to a string with FileToString() command and i send to the log, i have some issues:

- sometime i have empty lines before the readme
- sometime i have nothing but the progress bar is small
- sometime i have first lines showed and the up of the next

A problem of text format ?

About the progress bar, when i move the vertical slider with mouse wheel, it go directly down of the file (i can't see all lines of the readme).
If i move the slider with the mouse directly is ok i can see all the readme lines.
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Problem to show Readme file to a log box

Post by plouf »

What is a "log box" ?

Can show some example loading and some small code?
Christos
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem to show Readme file to a log box

Post by papiosaur »

This is screenshots for differents readme files:
The log box is the "Event logger" you can find in "demo" example in RAPAGUI examples.

Image
Image
Image

the part of code is

Code: Select all

function p_showreadme()
      readme$ = ram:readme.txt
      text$ = filetostring(readme$)
      p_log(text$)
Endfunction

function p_log(text$)
      moai.domethod("log", "clear", text$)
      moai.domethod("log", insert", bottom", text$)
Endfunction
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

[SOLVED] Problem to show Readme file to a log box

Post by papiosaur »

ok problem solved, i have replaced the logbox of the RAPAGUI "demo" by the Textbox of the Editor and work perfectly !
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: Problem to show Readme file to a log box

Post by plouf »

ok this was a listview widget, which is not intended to display pure text so..
but you should provide some basic WORKING code to start understant its not possible to always guess what you have done wrong..
Christos
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem to show Readme file to a log box

Post by papiosaur »

Yes, i will try next time :-)
Post Reply