Hi all,
I have a problem about Notes C++ API,
I developed an application with Notes C++ API. I want to change Form or View Action Bar properties.
I developed and when I test this application, I saw some bugs.
If View element has some action buttons, when I changed the properties of action bar, Actions’ Hide-When Formulas crashing.
I have “Invalid formula format” error. If view has not any action buttons, there is no problem about code.
Only problem occures when view has some action buttons.
Do you have any idea ?
C++ codes here:
NOTEID NoteID;
LNForm oForm;
LNActions oActions;
LNColor oActionBarBGColor;
LNColor oActionButtonBGColor;
oActionBarBGColor.SetIsRGB (TRUE);
oActionBarBGColor.SetBlueValue(GetBValue(rgbActionBarColor));
oActionBarBGColor.SetGreenValue(GetGValue(rgbActionBarColor));
oActionBarBGColor.SetRedValue(GetRValue(rgbActionBarColor));
oActionButtonBGColor.SetIsRGB (TRUE);
oActionButtonBGColor.SetBlueValue(GetBValue(rgbActionButtonColor));
oActionButtonBGColor.SetGreenValue(GetGValue(rgbActionButtonColor));
oActionButtonBGColor.SetRedValue(GetRValue(rgbActionButtonColor));
LNSetThrowAllErrors(TRUE);
for (int i = 0; i <= NoteIDList.GetUpperBound(); i++)
{
sscanf(NoteIDList.ElementAt(i), "%08X", &NoteID);
try {
oDatabase.GetForm(NoteID, &oForm);
oForm.Open();
oForm.GetActions (&oActions);
oActions.SetActionBarBackgroundColor(oActionBarBGColor);
oActions.SetActionBarButtonColor(oActionButtonBGColor);
if (strFontName != "")
{
oActions.SetActionBarFontStyle(oFontStyle);
oActions.SetActionBarFontColor (oActionButtonFontColor);
}
oForm.Save();
oForm.Close();
} catch (LNSTATUS LNError) {
char chrErrorBuf[LNERROR_MESSAGE_LENGTH];
LNGetErrorMessage(LNError, chrErrorBuf);
MessageBox ( chrErrorBuf, "ERROR !", MB_OK | MB_ICONINFORMATION );
return;
}
}
Thank you,
Ferhat