Ian McKnight wrote:
Thanks for the advice David. I went back and checked. As I still had the
text file open in Excel when I was trying to import it into LC the file must
have been locked in some way by Excel - as soon as I closed the file in XL
it worked perfectly. Makes perfect sense really.
I think I'll start writing down my gaffs down in a notebook to try and save
time in future :)
Why write them down when you can have LiveCode write them for you? :)
If you check "the result" after a command is run, a non-empty value will
usually contain an error string.
If you also include a call to the sysError function, you get the
system's error code to guide you to the specifics of the error.
And if you include all that in a handler call, you only need to write it
once, e.g.:
on SomeHandler
...
put url ("file:"& tMyExportedDataFile) into tData
Err the result
...
end SomeHandler
on Err s
if s is not empty then
put sysError() into tSysError
answer "An error occured: "& s &"(" &tSysError& ")"
exit to top
end if
end Err
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode