Page 1 of 1

Empty files and Shift Lock

Posted: Wed Jun 15, 2011 4:50 pm
by SteveHanlan
When I open a file that does not exist, all desktop versions return blank. Ios returns the name of the file.

i.e.

Code: Select all

put URL("file:accounts.txt") into accountlist
put the number of lines of accountlist into acctcount
on the desktop, acctcount is 0, on the iPad, it is 1

The obvious solution is to insert the line

Code: Select all

if accountlist="accounts.txt" then put "" into accountlist
after the 'put URL' line, but this should not be necessary

Also, with the keyboard set to default, the shift key acts as a Shift Lock on the iPad, (but not on the desktop versions)

Any ideas

thanks

Steve

Re: Empty files and Shift Lock

Posted: Wed Jun 15, 2011 5:25 pm
by Klaus
Hi Steve,

I'm not sure if this is correct behaviour, I never experienced this because
I always and ever check if a file exists before I try to read it! 8)

Code: Select all

...
if there is a file "accounts.txt" then
   put URL"file:accounts.txt") into accountlist
else
   put empty into accountlist
end if
...
Sorry, no idea about your keyboard question...


Best

Klaus

Re: Empty files and Shift Lock

Posted: Thu Jun 16, 2011 12:22 am
by SteveHanlan
Thanks Klaus

That will work just fine, it's just strange to have different behavior on iOS

Steve

Re: Empty files and Shift Lock

Posted: Thu Jun 16, 2011 12:00 pm
by Klaus
Hi Steve,

life is a compromise! 8)


Best

Klaus