Events pfc_验证事件编码示例
你能给我一个例子,说明我应该如何编码到Events pfc_验证事件编码示例,events,validation,powerbuilder,powerbuilder-pfc,Events,Validation,Powerbuilder,Powerbuilder Pfc,你能给我一个例子,说明我应该如何编码到pfc\U验证事件中吗?这是我从未使用过的事件。例如,这里是我在ue\u itemchanged事件中编写的代码 if dwo.name = 'theme' then This.Setitem(row,"theme",wf_clean_up_text(data)) end if if dwo.name = 'Comments' then This.Setitem(row,"Comments",wf_clean_up_text(data)
pfc\U验证
事件中吗?这是我从未使用过的事件。例如,这里是我在ue\u itemchanged
事件中编写的代码
if dwo.name = 'theme' then
This.Setitem(row,"theme",wf_clean_up_text(data))
end if
if dwo.name = 'Comments' then
This.Setitem(row,"Comments",wf_clean_up_text(data))
end if
在
pfc\u Validation
事件中,哪种方法是正确编码这些验证的方法,以便它们只在节省时间的情况下执行?您在询问本机PowerBuilder之外的问题,因此无法保证我的假设是正确的。(例如,任何人都可以创建一个PFCL验证事件,当用户用鼠标画圆)时,它有一个PFCL验证事件,它被编码为PoPuBurdFoundation类(PFC)中逻辑工作单元(LUW)服务的一部分。如果你想了解更多,我已经在LUW上写过了
首先,你的问题是:LUW服务中的所有东西都是在节省时间的情况下启动的,所以你在那里状态良好
话虽如此,从代码的外观来看,这不是验证,而是为更新做数据准备。在此基础上,我建议这种逻辑的合适位置是pfc_UpdatePrep
至于转换代码,它非常简单。(现在,看着我把事情搞砸。)
祝你好运
特里
FOR ll = 1 to RowCount()
Setitem(ll,"theme",wf_clean_up_text(GetItemString (ll, "theme")))
Setitem(ll,"comments",wf_clean_up_text(GetItemString (ll, "comments")))
NEXT