Edit truncates start of file

5 views
Skip to first unread message

tpschmit

unread,
Jan 20, 2011, 3:58:46 AM1/20/11
to iLuaBox
Hello,

Thanks for making iLuaBox available. I can't wait for the goodies
you've been discussing for future releases. Then we can use it to
write serious apps on the iPad itself!

To try things out I got Ricci Lake's 'menu.lua' from here:
http://lua-users.org/files/wiki_insecure/users/rici/menu.lua

I pasted it into the input pane and it runs and saves fine -- 5087
bytes. If I 'cat()' it, it all shows up in the output pane and I can
copy/paste it to the input and run it fine.

But if I 'edit()' it I end up with some lines missing from the
beginning.

I set both the in and out buffers to 20000 but still get the same
result.

Help!

Keep up the good work.

Best,
Tom

Tom Skwara

unread,
Jan 20, 2011, 2:40:40 PM1/20/11
to ilu...@googlegroups.com
Ricci Lake's 'menu.lua' code is quite nice.

I was able to re-produce this behavior  using the standard buffer settings (_INPUTBUFFERSIZE = 4000, _OUTPUTBUFFERSIZE=2000).  The program lists entirely, but as the screen buffer fills past the limit,  the top few lines of script are scrolled out of the buffer (by design). 

After setting _OUTPUTBUFFERSIZE to 20000, the code lists completely and doesn't scroll out of the output screen buffer.  Setting _INPUTBUFFERSIZE to 20000, the code lists completely using the EDIT() command and doesn't scroll out of the input screen buffer.  Again, this behavior is by design.  The reason these buffer size limits exist is to keep the screen highly responsive 

One thing worth mentioning is that changing the values of _INPUTBUFFERSIZE or _OUTPUTBUFFERSIZE is not persistent between sessions.  Perhaps you made the change, but completely shutdown and restarted iLuaBox, only to have the values revert to their default settings?

Persisting any value can be accomplished by adding code to your start-up script ('hello.lua' by default).  You can also execute your own startup code by adding the following line to 'hello.lua':
dofile('yourcode.lua') 


Tom Skwara



tpschmit

unread,
Jan 24, 2011, 12:17:44 PM1/24/11
to iLuaBox
Thanks Tom (and for the quick response). Works fine now.
Stupid me: I had it in 'extras.lua' but had misspelled the variables
leaving off the 'SIZE' part.

Would sure be great if we could print a screen full of output then
assign touch related callbacks to the entire screen and/or areas of it
(please, please, puleasssse).

Keep up the good work.

Best,
Tom

Tom Skwara

unread,
Jan 25, 2011, 12:04:37 PM1/25/11
to ilu...@googlegroups.com, iLuaBox
Glad everything worked out.

As far as your request for screen (UI) elements with callbacks, buckle your seatbelt ;) you will be pleasantly surprised very soon...

Tom Skwara

Reply all
Reply to author
Forward
0 new messages