Getting into LiveCode for iOS? Ask your questions here.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Post
by marksmithhfx » Fri Feb 26, 2016 8:25 pm
The following code
Code: Select all
mobilecomposemail tSubject,tTo,,,,tAttachment
put "this is a test" into tresult
answer tresult with "Ok"
produces an answer dialog with "this is a test" as you would expect.
The following
Code: Select all
mobilecomposemail tSubject,tTo,,,,tAttachment
put the result into tresult
answer tresult with "Ok"
puts out a blank answer dialog (with "Ok") regardless of whether the mail sends or not.
Am I the only one seeing this?
Thanks
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
-
quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Post
by quailcreek » Fri Feb 26, 2016 8:49 pm
Hi,
Your top example really doesn't prove anything that the var exists.
The second example shows the result is empty and it shouldn't be. I have seen this too. It also happens with printing to pdf on mobile.
This returns empty too.
Code: Select all
if btnClicked is "Print Hard Copy" then
rreHardcopyPrintPDF tPDFFile, "Test PDF Print"
answer the result
Tom
MacBook Pro OS Mojave 10.14
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Post
by marksmithhfx » Fri Feb 26, 2016 9:46 pm
Thanks Tom. I will report it as a bug.
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Post
by marksmithhfx » Sat Feb 27, 2016 11:45 pm
Filed as bug 17031
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Post
by marksmithhfx » Sun Feb 28, 2016 4:11 pm
Can anyone test the following, or something similar, to see if you can get the "cannot send email" message? I put my iPad into airplane mode which presumably would make it ineligible to send mail but the "else" part of this clause was not triggered. I don't have a device handy that has absolutely no email capability. The dictionary is not helpful in this regard because it does not indicate what constitutes having the ability to send email (ie. what the test is actually testing).
Code: Select all
on mouseUp
if mobilecansendmail() is true then
go card "export"
else
answer "This device cannot send email at the present time" with "Ok"
end if
end mouseUp
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS
-
quailcreek
- Posts: 746
- Joined: Sun Feb 04, 2007 11:01 pm
Post
by quailcreek » Sun Feb 28, 2016 4:26 pm
I believe that the check is whether the machine has the capability to send and email. When you go into airplane mode is only turns off access to the outside world via WiFi, phone, internet, etc. So the capability is still there but the ability is turned off.
Tom
MacBook Pro OS Mojave 10.14
-
jacque
- VIP Livecode Opensource Backer

- Posts: 7390
- Joined: Sat Apr 08, 2006 8:31 pm
-
Contact:
Post
by jacque » Mon Feb 29, 2016 7:22 pm
Tom's right, what you want is to check for a working Internet connection. The easiest way is to get a known url, like the Google search page or a small file on your own server, and see if you get an error.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
marksmithhfx
- VIP Livecode Opensource Backer

- Posts: 931
- Joined: Thu Nov 13, 2008 6:48 am
Post
by marksmithhfx » Mon May 02, 2016 12:56 am
jacque wrote:Tom's right, what you want is to check for a working Internet connection. The easiest way is to get a known url, like the Google search page or a small file on your own server, and see if you get an error.
But what if the user does not have a functioning email account setup ie. is not capable of sending an email from the device?
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS