Can anyone figure out why in the attached stack this script grabs the phone number out of the third column of the data grid in the IDE but not in the simulator? The funny thing is it was working both in the simulator and on my phone devise making phone calls earlier.
Weird!
Dave
on mouseUp
put the dgHilitedLines of group "mygrid" into theLine
put the dgDataOfLine[theLine] of group "mygrid" into theDataA
put theDataA[column3] into tValue
answer "Would you like to call" && tValue && "?" with "Yes" or "Cancel"
if it is "Yes" then
replace "-" with "" in tValue
answer tValue
put "tel:" & tValue into tMYNumber
launch url tMYNumber
end if
end mouseUp
This is Interesting
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
This is Interesting
- Attachments
-
- MyPhoneTest.livecode.zip
- (4.86 KiB) Downloaded 251 times
-
- VIP Livecode Opensource Backer
- Posts: 47
- Joined: Thu Apr 27, 2006 11:19 pm
Re: This is Interesting
I don't think we can make a call using the simulator.
http://stackoverflow.com/questions/9679 ... ners-to-it
http://stackoverflow.com/questions/9679 ... ners-to-it
Re: This is Interesting
Yes I realize that. It's the script below that doesn't return the phone number in column number three that I can't figure out.
tvalue contains the phone number in the IDE but is empty in the simulator and on the devise and yes the var theLine does contain a valid line number.
put the dgDataOfLine[theLine] of group "mygrid" into theDataA
put theDataA[column3] into tValue
Dave
tvalue contains the phone number in the IDE but is empty in the simulator and on the devise and yes the var theLine does contain a valid line number.
put the dgDataOfLine[theLine] of group "mygrid" into theDataA
put theDataA[column3] into tValue
Dave
Re: This is Interesting
Hi Dave
I believe it is because you don't have the datagrid template substack with your stack - I think this is necessary for it to function correctly... (I just inserted some "put" statements after some of your statements and that indicated your vars were empty).
Though that doesn't explain why it still seems to work in the dev environment (maybe thanks to some other stack loading the DG substack?).
HTH
Alan
I believe it is because you don't have the datagrid template substack with your stack - I think this is necessary for it to function correctly... (I just inserted some "put" statements after some of your statements and that indicated your vars were empty).
Though that doesn't explain why it still seems to work in the dev environment (maybe thanks to some other stack loading the DG substack?).
HTH
Alan