differnce between Development mode and Standalone mode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 151
- Joined: Sat Aug 25, 2012 1:14 am
differnce between Development mode and Standalone mode
This is the code that I am using and it works on the RunRev Development Test mode when I use the suspend development tools mode, but not when I place the app on my target iPad or IPhone.
on mouseUp
put the name of this card into gcurrentname
visual effect push left
go to card "SavedColorList"
put empty into field ColorList
Put empty into field ColorChoiceDetail
put empty into line 1 of field "Color(s)"
put empty into line 2 of field "Color(s)"
set the backgroundcolor of line 1 of field "Color(s)" to empty
set the backgroundcolor of line 2 of field "Color(s)" to empty
set the itemDel to tab
set the defaultFolder to specialFolderPath("documents")
put url ("file:" & specialFolderPath("documents") & "/colorlist.txt") into tColorList
answer tColorList (the answer is blank - when ran on the iPhone or iPad)
repeat with x = 1 to the number of lines in tColorlist
get item 1 of line x of tColorlist
put it into item 1 of line x of field ColorList
end repeat
end mouseUp
on mouseUp
put the name of this card into gcurrentname
visual effect push left
go to card "SavedColorList"
put empty into field ColorList
Put empty into field ColorChoiceDetail
put empty into line 1 of field "Color(s)"
put empty into line 2 of field "Color(s)"
set the backgroundcolor of line 1 of field "Color(s)" to empty
set the backgroundcolor of line 2 of field "Color(s)" to empty
set the itemDel to tab
set the defaultFolder to specialFolderPath("documents")
put url ("file:" & specialFolderPath("documents") & "/colorlist.txt") into tColorList
answer tColorList (the answer is blank - when ran on the iPhone or iPad)
repeat with x = 1 to the number of lines in tColorlist
get item 1 of line x of tColorlist
put it into item 1 of line x of field ColorList
end repeat
end mouseUp
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: differnce between Development mode and Standalone mode
What specifically do you mean by "doesn't work"? Does it throw an error? Does anything happen at all?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: differnce between Development mode and Standalone mode
Hi tyarmsteadBUSuSfT,
I read your script and i don't see where is the mistake.
Maybe:
IOS is casesensitive. Check if file "colorlist.txt = "ColorList.txt" or something like that
Best regards
Jean-Marc
I read your script and i don't see where is the mistake.
Maybe:
IOS is casesensitive. Check if file "colorlist.txt = "ColorList.txt" or something like that
Best regards
Jean-Marc
https://alternatic.ch
Re: differnce between Development mode and Standalone mode
Hi Ty,
I still don't see not any ANSWERs for debugging
Try this and tell where what ANSWER dialog(s) you do NOT see in a standalone:
Best
Klaus
I still don't see not any ANSWERs for debugging

Try this and tell where what ANSWER dialog(s) you do NOT see in a standalone:
Code: Select all
on mouseUp
put the name of this card into gcurrentname
visual effect push left
go to card "SavedColorList"
## NAMES of controls always in QUOTES!
put empty into field "ColorList"
Put empty into field "ColorChoiceDetail"
put empty into line 1 of field "Color(s)"
put empty into line 2 of field "Color(s)"
set the backgroundcolor of line 1 of field "Color(s)" to empty
set the backgroundcolor of line 2 of field "Color(s)" to empty
## Just to be sure :-)
ANSWER "field init done!"
set the itemDel to tab
## Not neccessary, since you use an absolute path in the PUT URL...!
## set the defaultFolder to specialFolderPath("documents")
put specialFolderPath("documents") & "/colorlist.txt" into tColorFile
ANSWER "file present:" && (there is a file tColorFile)
## Will give you FALSE if the file is not (yet) present!
## So you should EXIT the mouseup handler in that case!
if there is not a file tColorFile then
exit mouseup
end if
put url ("file:" & tColorFile) into tColorList
ANSWER the result
## should be EMPTY on success
ANSWER "Filecontent:" & CR & tColorList
repeat with x = 1 to the number of lines of tColorlist
put item 1 of line x of tColorList into item 1 of line x of field "ColorList"
end repeat
end mouseUp
Klaus
-
- Posts: 151
- Joined: Sat Aug 25, 2012 1:14 am
Re: differnce between Development mode and Standalone mode
Klaus, it worked thank you. I did put an answer in the script put it was 4 lines from the end. I'm using answer all the time now.
Thank you again.
Thank you again.
Re: differnce between Development mode and Standalone mode
And was was happening or got fixed?tyarmsteadBUSuSfT wrote:Klaus, it worked thank you. I did put an answer in the script put it was 4 lines from the end. I'm using answer all the time now.
Thank you again.