09-05-2019, 09:07 PM
Howdy Alexandre!
I downloaded the latest interim version to test against my application and I am happy to report that most of my application is working.
The earlier issue I reported about memory EAccessErrors was caused because apparently in IW 15.0.24->15.1 the destruction of objects (or at least child forms) of a form has changed! That is, I have a form that contains a couple of children IWAppForms and I was saving their some of their variables in my main form's deconstructor because usually they aren't destroyed until AFTER my destructor has run. Any how, once I noticed this, I was able to fix my issue.
The problem I haven't figured out that is causing me issues is RegisteredCallBack()s. I have a class I wrote that encapsulates a bootstrap 4 progress stepper class. Since it is a non-visual class, I use a TDataModule. When I registered my callback, I use the function below:
void TSSBS4ProgressStepperDataModule::RegisterCallbacks(void)
{
// Add JS events
SSStringListUniquePtr pJavaScript(new TSSStringList);
pJavaScript->Add(L"function OnStepItemClick(event)");
pJavaScript->Add(L"{");
pJavaScript->Add(L"executeAjaxEvent(\"&ID=\"+event.currentTarget.id.toString(),null,\"" + UpperCase(Name) + L".OnStepItemClick\",false, null, false)");
pJavaScript->Add(L"}");
Form->JavaScript->AddStrings(pJavaScript.get());
Form->WebApplication->RegisterCallBack(UpperCase(Name) + L".OnStepItemClick",OnStepItemClick);
}
When I render the control that will call the above event, I use the following code line:
pHtmlList->AddEx ( L"<a href=\"#\" id=\"%d\" onclick=\"OnStepItemClick(event)\">%s</a>",nStepID,strCaption.c_str());
Any how, all works in IW versions 15.0.24 and previous.
I looked at the demos and don't see an updated example of how to do the new callbacks.
What am I missing?
Thanks,
Shane
I downloaded the latest interim version to test against my application and I am happy to report that most of my application is working.
The earlier issue I reported about memory EAccessErrors was caused because apparently in IW 15.0.24->15.1 the destruction of objects (or at least child forms) of a form has changed! That is, I have a form that contains a couple of children IWAppForms and I was saving their some of their variables in my main form's deconstructor because usually they aren't destroyed until AFTER my destructor has run. Any how, once I noticed this, I was able to fix my issue.
The problem I haven't figured out that is causing me issues is RegisteredCallBack()s. I have a class I wrote that encapsulates a bootstrap 4 progress stepper class. Since it is a non-visual class, I use a TDataModule. When I registered my callback, I use the function below:
void TSSBS4ProgressStepperDataModule::RegisterCallbacks(void)
{
// Add JS events
SSStringListUniquePtr pJavaScript(new TSSStringList);
pJavaScript->Add(L"function OnStepItemClick(event)");
pJavaScript->Add(L"{");
pJavaScript->Add(L"executeAjaxEvent(\"&ID=\"+event.currentTarget.id.toString(),null,\"" + UpperCase(Name) + L".OnStepItemClick\",false, null, false)");
pJavaScript->Add(L"}");
Form->JavaScript->AddStrings(pJavaScript.get());
Form->WebApplication->RegisterCallBack(UpperCase(Name) + L".OnStepItemClick",OnStepItemClick);
}
When I render the control that will call the above event, I use the following code line:
pHtmlList->AddEx ( L"<a href=\"#\" id=\"%d\" onclick=\"OnStepItemClick(event)\">%s</a>",nStepID,strCaption.c_str());
Any how, all works in IW versions 15.0.24 and previous.
I looked at the demos and don't see an updated example of how to do the new callbacks.
What am I missing?
Thanks,
Shane