below is my code for my edit button. first run (project file) it will work but now once i open the edit script it has a error. before it's working in the community version and standalone application. I tried to run in starter livecode and community version same result has error but before it is working.
hope you can help me. thanks in advance
Code: Select all
on mouseUp tbutton
global tLineToEdit
if tbutton = 1 then
put the dgHilitedLine of group "MyUserList" into tLineToEdit
if tLineToEdit is empty then
beep
Answer info "Please select user name to EDIT INFORMATION" titled "DSWD"
else
if tLineToEdit is a number and tLineToEdit >0 then
set the defaultstack to "EditUserStack"
set the itemdel to tab
put line tLineToEdit of the dgtext of grp "MyUserList" of cd "UserCard" of stack "UserStack" into tData
put item 1 of tData into fld "userIDFld"
put item 2 of tData into fld "FNameFld"
put item 3 of tData into fld "MNameFld"
put item 4 of tData into fld "LNameFld"
put item 5 of tData into fld "UserNameFld"
put item 6 of tData into fld "PasswordFld"
set the label of btn "GenderList" to item 7 of tData
put item 8 of tData into fld "CityFld"
put item 9 of tData into fld "ProvinceFld"
set the label of btn "RoleList" to item 10 of tData
set the defaultstack to "EditUserStack"
modal stack "EditUserStack"
end if
end if
else
exit mouseUp
end if
end mouseUp