Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IW 15.1.5.RC7
#1
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
Reply
#2
Any help would be appreciated......
Reply
#3
(09-05-2019, 09:07 PM)ShaneStump Wrote: 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

Anyone?????
Reply
#4
Alexandre told me that he is looking at this and other issues as well.
Reply
#5
(09-13-2019, 02:33 PM)kudzu Wrote: Alexandre told me that he is looking at this and other issues as well.

Thanks!

I just downloaded version 15.1.5 and I am installing on my new laptop with 10.3.2.

If I can get my application moved successfully today, this will be the FIRST time in years that I finally have my code on the latest version of everything (IDE/third party components).

Well, back to work.

Shane
Reply
#6
Welcome to the current. Smile
Reply
#7
Hi Shane,

I'm not exactly sure what you meant when you mention that the destruction order has changed in IWForm.

It hasn't actually. IWForm's OnDestroy event happens before the form destroys its child controls, as is common in VCL framework. So, I'm not exactly sure about what is causing your issue.
Reply
#8
(09-13-2019, 11:58 PM)Alexandre Machado Wrote: Hi Shane,

I'm not exactly sure what you meant when you mention that the destruction order has changed in IWForm.

It hasn't actually. IWForm's OnDestroy event happens before the form destroys its child controls, as is common in VCL framework. So, I'm not exactly sure about what is causing your issue.
Alexandre!

How the hell did you read the first part of the problem I say I have solved and ignore the part that I posted the longest about Smile ?

Please read the part about the callback in the datamodule no longer working.

All the best,

Shane
Reply
#9
Howdy all!

I finally downloaded and installed the official version of IW 15.1.5.

A callback function I have that worked in all version of IW15 up to version 15.0.24 now no longer works.

The callback event is implemented in a TDataModule (child component of my form).

I added a 'console.out' to my javascript event and it does get called.

The executeAjaxEvent() doesn't call my registered callback.

Here is my javascript event:

function OnStepItemClick(event)
{
executeAjaxEvent("&ID="+event.currentTarget.id.toString(),null,\"" + Name.UpperCase() + ".OnStepItemClick\",false, null, false);
console.log('OnStepItemClick() called!' + event.currentTarget.id.toString());
}

Here is my register callback code:

Form->WebApplication->RegisterCallBack(Name.UpperCase() + L".OnStepItemClick",OnStepItemClick);

I can't release my updated web module until I get this resolved.

Any ideas on what has changed? How to fix it? How to debug it?

Thanks,

Shane
Reply
#10
Hi Shane,

can you please setup a little demo showing the issue?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)