本文整理汇总了C++中CFXJSE_Value::SetString方法的典型用法代码示例。如果您正苦于以下问题:C++ CFXJSE_Value::SetString方法的具体用法?C++ CFXJSE_Value::SetString怎么用?C++ CFXJSE_Value::SetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFXJSE_Value
的用法示例。
在下文中一共展示了CFXJSE_Value::SetString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Response
void CScript_HostPseudoModel::Response(CFXJSE_Arguments* pArguments) {
int32_t iLength = pArguments->GetLength();
if (iLength < 1 || iLength > 4) {
ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"response");
return;
}
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
return;
}
CFX_WideString wsQuestion;
CFX_WideString wsTitle;
CFX_WideString wsDefaultAnswer;
FX_BOOL bMark = FALSE;
if (iLength >= 1) {
CFX_ByteString bsQuestion = pArguments->GetUTF8String(0);
wsQuestion = CFX_WideString::FromUTF8(bsQuestion.AsStringC());
}
if (iLength >= 2) {
CFX_ByteString bsTitle = pArguments->GetUTF8String(1);
wsTitle = CFX_WideString::FromUTF8(bsTitle.AsStringC());
}
if (iLength >= 3) {
CFX_ByteString bsDefaultAnswer = pArguments->GetUTF8String(2);
wsDefaultAnswer = CFX_WideString::FromUTF8(bsDefaultAnswer.AsStringC());
}
if (iLength >= 4) {
bMark = pArguments->GetInt32(3) == 0 ? FALSE : TRUE;
}
CFX_WideString wsAnswer = pNotify->GetAppProvider()->Response(
wsQuestion, wsTitle, wsDefaultAnswer, bMark);
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
pValue->SetString(FX_UTF8Encode(wsAnswer).AsStringC());
}
示例2: CurrentDateTime
void CScript_HostPseudoModel::CurrentDateTime(CFXJSE_Arguments* pArguments) {
CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
if (!pNotify) {
return;
}
CFX_WideString wsDataTime = pNotify->GetCurrentDateTime();
CFXJSE_Value* pValue = pArguments->GetReturnValue();
if (pValue)
pValue->SetString(FX_UTF8Encode(wsDataTime).AsStringC());
}
示例3: FXJSE_Value_SetUTF8String
void FXJSE_Value_SetUTF8String(FXJSE_HVALUE hValue,
const CFX_ByteStringC& szString) {
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
ASSERT(lpValue);
return lpValue->SetString(szString);
}