Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[[ Bug 22803 ]] Fix runtime error when editing a DG form #2140

Open
wants to merge 1 commit into
base: develop-9.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9253,36 +9253,37 @@ command DeleteFieldEditor pSaveContents
## Did user want us to automatically save?
if theIndex is an integer and (theKey is not empty and theKey is not an array) then
if contentHasChanged then

local tText
## Give the developer a chance to stop value from being set
try
dispatch "CloseFieldEditor" to theField with theEditor
switch the dgTextType of theEditor
case "html"
put the HTMLText of theEditor into tText
break
case "rtf"
put the RTFText of theEditor into tText
break
case "unicode"
put the unicodeText of theEditor into tText
break
case "utf8"
put the unicodeText of theEditor into tText
put uniDecode(tText, "utf8") into tText
break
default
put the text of theEditor into tText
end switch

dispatch "CloseFieldEditor" to theField with theEditor
if it is "handled" then
put the result into theResult
end if

if theResult is not "cancel" then
local theDataA
put sDataArray[theIndex] into theDataA

switch the dgTextType of theEditor
case "html"
put the HTMLText of theEditor into theDataA[theKey]
break
case "rtf"
put the RTFText of theEditor into theDataA[theKey]
break
case "unicode"
put the unicodeText of theEditor into theDataA[theKey]
break
case "utf8"
put the unicodeText of theEditor into theDataA[theKey]
put uniDecode(theDataA[theKey], "utf8") into theDataA[theKey]
break
default
put the text of theEditor into theDataA[theKey]
end switch
set the dgDataOfIndex [theIndex] of me to theDataA
put tText into theDataA[theKey]
set the dgDataOfIndex[theIndex] of me to theDataA
end if
catch e
put e into theError
Expand Down
1 change: 1 addition & 0 deletions notes/bugfix-22803.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Fix runtime error when editing a DG form