Problem with io.read()

7 views
Skip to first unread message

berkastho

unread,
Mar 20, 2011, 2:37:01 AM3/20/11
to iLuaBox
I installed iLuaBox yesterday and I tried the edit() function without
a parameter. I can only see the output of the files and a 'nil' for
the input, because the program does not stop for entering an answer.
What's going wrong or what am I doing wrong...?

Thanks in advance

Ali Sherif

unread,
Mar 20, 2011, 5:26:58 AM3/20/11
to iLuaBox
Simple. Read the last line in the output side. then input the number
of the file you want to edit. Last press "E" on the top right corner
of the screen.

Regards,

berkastho

unread,
Mar 20, 2011, 8:22:37 AM3/20/11
to iLuaBox

> Simple. Read the last line in the output side. then input the number
> of the file you want to edit. Last press  "E" on the top right corner
> of the screen.
>
> Regards,

Sorry, but I dont know how to read the last line in the output side.
I thought and still think that after io.read() the program has to stop
for a user input.

Still need help, although it's so simple... :(

Ron Jeffries

unread,
Mar 20, 2011, 8:32:38 AM3/20/11
to ilu...@googlegroups.com
Hello, berkastho. On Sunday, March 20, 2011, at 8:22:37 AM, you
wrote:

> Sorry, but I dont know how to read the last line in the output side.
> I thought and still think that after io.read() the program has to stop
> for a user input.

> Still need help, although it's so simple... :(

It does stop. You put input on the INPUT side (right hand side),
then press the new button that appears beside the > run button.
Very weird but makes sense after you get used to it.

Ron Jeffries
www.XProgramming.com
Hold on to your dream. --ELO

ronjeff...@gmail.com

unread,
Mar 20, 2011, 10:33:26 AM3/20/11
to ilu...@googlegroups.com
After you type edit() in the right panel and press run, the files list in the left panel, and then
"Enter a file number to edit:". You can scroll the left panel with your finger to see the complete file list.

In the RIGHT (input) panel, touch to get focus, then type the number of the file you want to edit. Note that in the top right of the window there is a waiting indicator, and an E in a box. Press the E and your input will echo into the right panel, and the input panel will display the file. Edit as you wish.

berkastho

unread,
Mar 20, 2011, 12:43:40 PM3/20/11
to iLuaBox
May be I am blind or I am still doing something wrong, but all I can
see after the command edit() is in the output panel the list of files
with the final line: "Enter a file number to edit:nil"
In the RIGHT (input) panel I can only see the triangle (or Run button)
and no waiting indicator. May be I have another version or it does not
work with the ipod touch, I don't know...

berkastho

unread,
Mar 20, 2011, 12:55:47 PM3/20/11
to iLuaBox
Now it's working!!!!
I only switched off the ipod and after the restart the edit() command
worked. Now I can see the E-button and can enter a number. May be the
Runtime of Lua had a fault while running so long... I still don't know

Thanks for all the help
Reply all
Reply to author
Forward
0 new messages