News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Transcribe.lua
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Transcribe.lua

Crash when you cancel the file open dialog.

Code:
local filename=fltk.fl_file_chooser("Open transcript","*.txt","transcript.txt",0)
local test = io.open(filename,"r")

You're testing to see if filename can be read, but not testing first if filename has been set.

Code:
local filename=fltk.fl_file_chooser("Open transcript","*.txt","transcript.txt",0)
if not filename then return end
local test = io.open(filename,"r")

This post was last modified: 12-29-2010 06:06 AM by mikshaw.

12-29-2010 06:02 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Transcribe.lua - jpjacobs - 12-28-2010, 11:55 AM
RE: Transcribe.lua - mikshaw - 12-29-2010 06:02 AM
RE: Transcribe.lua - jpjacobs - 12-29-2010, 08:38 AM
RE: Transcribe.lua - dvw86 - 12-30-2010, 12:15 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: