Hi all,
Coming from languages like C#, C++, Python this lua+Corona experience feels a bit like handing over sharp loaded guns to 7 year olds and tell them to go out and play in the garden. There’s no way to say what will get shot.
In Python you put try: except: on various levels as you see fit. Even if you don’t bother to carefully check every statement, you can catch an error on a group that belongs together. Basically it turns out nice and robust in an intuitive way.
While it’s nice to only have to write…
testImage = display.newImage(filename,system.DocumentsDirectory,60,50);
…to add an image, I don’t quite see how to deal with errors.
Or a less trivial case
group = display.newGroup()
local offs = 0
for row in db:nrows("select filename from images") do
group:insert(display.newImage(row.filename,system.DocumentsDirectory,10,50 \* offs));
offs = offs + 1
end
Does any of the files not exist? Is any file corrupt? Memory overflow of the device?
Basically, how do I create a non amateurish application? I’ll make a swift acknowledgment that I’m a lua noob and probably should rtfm more.
Thanks,
Marcus [import]uid: 4441 topic_id: 1127 reply_id: 301127[/import]
