I have done a little app with a field text (please see attached picture). Now it works as normal when working in Rev but when I compile it into a standalone app, the text fields are not editable.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Scripting solutions is a mandatory effort, just by nature of what you are doing and LiveCode makes the majority of it very easy to learn and do. Be thankful that you aren't using a much lower level programming language.Rev should have incorporate this basic script into the field object instead of us having to script all this.
Code: Select all
on savestuff
put field "tabular shit" into url ("file:" & "tabular shit.tab")
end savestuff
on retrievestuff
put url ("file:" & "tabular shit.tab") into field "tabular shit"
end retrievestuff
It's really not difficult at all.A very simple procedure but difficult to get in Rev.
Code: Select all
on mouseUp
answer file "Select the file" with type "TXT|txt"
put it into tFile
put url ("file:" & tFile) into fld "DataTable"
end mouseUp
Code: Select all
on mouseUp
do AskToSave
end mouseUp
on AskToSave
answer "Do you wish to save the file" with "Yes" or "No"
if it is "Yes" then
do SaveTheFile
else
----do whatever else or exit
----have a look at closeStackRequest in dictionary
end if
end AskToSave
on SaveTheFile
ask file "Save file:"
if it <> "" then
put the text of fld "DataTable" into url("file:" & it)
end if
end SaveTheFile
Code: Select all
on mouseUp
AskToSave
end mouseUp
on AskToSave
answer "Do you wish to save the file" with "Yes" or "No"
if it is "Yes" then
SaveTheFile
end if
end AskToSave
on SaveTheFile
ask file "Save file:"
if it <> "" then
put the text of fld "DataTable" into url("file:" & it)
end if
end SaveTheFile
Try this:pmc wrote:...Code: Select all
on mouseUp answer file "Select an image:" with type "Images|jpg,png,gif|" ### This will give you a FILENAME! ### You know what a filename is? put it into tFilename if tFilename = empty then exit mouseup ## At this point the script is finished, so the next line will never be executed! if tFilename=1 then ## See above, a FILENAME is never a number! put it into image "userimage" end if end if end mouseUp
Code: Select all
on mouseUp
answer file "Select an image:" with type "Images|jpg,png,gif|"
put it into tFilename
if tFilename = empty then
## User hit CANCEL!
exit mouseup
END IF
set the FILENAME of image "userimage" to tFilename
end mouseUp