(08-13-2020, 08:20 PM)joelcc Wrote: I loaded source for iw15.2.12 and tried to debug the issues but could not get
I found that when the program creates a form from scratch everything works but when I try to go back to reshow the form (after I have been to another form) then it gets the AV, etc.
For now I had to roll back to iw15.1.22
Here is some more information that might help.
I am running this code
function fxGetForm(aWebApplication: TIWApplication; aFormName: string): TIWAppForm;
var
lthisPage: TIWAppForm;
lthisPageClass: TIWAppFormClass;
begin
lthisPage := TIWAppForm(aWebApplication.FindComponent(aFormName));
if lthisPage = nil then
begin
lthisPageClass := TIWAppFormClass(FindClass('T' + aFormName));
Result := lthisPageClass.Create(aWebApplication);
end
else
Result := lthisPage;
end;
with TfrmClaim(fxGetForm(WebApplication, 'frmClaim')) do -> frmClaim represents some page to move to
begin
BeforeShow;
Show; -> this is where the error occurs, but the error only occurs if the "lthisPage" in the fxGetForm function is nil and thus forces the creation of a new page.
end;
(08-13-2020, 09:39 PM)joelcc Wrote:(08-13-2020, 08:20 PM)joelcc Wrote: I loaded source for iw15.2.12 and tried to debug the issues but could not get
I found that when the program creates a form from scratch everything works but when I try to go back to reshow the form (after I have been to another form) then it gets the AV, etc.
For now I had to roll back to iw15.1.22
Here is some more information that might help.
I am running this code
function fxGetForm(aWebApplication: TIWApplication; aFormName: string): TIWAppForm;
var
lthisPage: TIWAppForm;
lthisPageClass: TIWAppFormClass;
begin
lthisPage := TIWAppForm(aWebApplication.FindComponent(aFormName));
if lthisPage = nil then
begin
lthisPageClass := TIWAppFormClass(FindClass('T' + aFormName));
Result := lthisPageClass.Create(aWebApplication);
end
else
Result := lthisPage;
end;
with TfrmClaim(fxGetForm(WebApplication, 'frmClaim')) do -> frmClaim represents some page to move to
begin
BeforeShow;
Show; -> this is where the error occurs, but the error only occurs if the "lthisPage" in the fxGetForm function is nil and thus forces the creation of a new page.
end;
(08-13-2020, 09:39 PM)joelcc Wrote:(08-13-2020, 08:20 PM)joelcc Wrote: I loaded source for iw15.2.12 and tried to debug the issues but could not get
I found that when the program creates a form from scratch everything works but when I try to go back to reshow the form (after I have been to another form) then it gets the AV, etc.
For now I had to roll back to iw15.1.22
Here is some more information that might help.
I am running this code
function fxGetForm(aWebApplication: TIWApplication; aFormName: string): TIWAppForm;
var
lthisPage: TIWAppForm;
lthisPageClass: TIWAppFormClass;
begin
lthisPage := TIWAppForm(aWebApplication.FindComponent(aFormName));
if lthisPage = nil then
begin
lthisPageClass := TIWAppFormClass(FindClass('T' + aFormName));
Result := lthisPageClass.Create(aWebApplication);
end
else
Result := lthisPage;
end;
with TfrmClaim(fxGetForm(WebApplication, 'frmClaim')) do -> frmClaim represents some page to move to
begin
BeforeShow;
Show; -> this is where the error occurs, but the error only occurs if the "lthisPage" in the fxGetForm function is nil and thus forces the creation of a new page.
end;
(08-13-2020, 09:39 PM)joelcc Wrote:(08-13-2020, 08:20 PM)joelcc Wrote: I loaded source for iw15.2.12 and tried to debug the issues but could not get
I found that when the program creates a form from scratch everything works but when I try to go back to reshow the form (after I have been to another form) then it gets the AV, etc.
For now I had to roll back to iw15.1.22
Here is some more information that might help.
I am running this code
function fxGetForm(aWebApplication: TIWApplication; aFormName: string): TIWAppForm;
var
lthisPage: TIWAppForm;
lthisPageClass: TIWAppFormClass;
begin
lthisPage := TIWAppForm(aWebApplication.FindComponent(aFormName));
if lthisPage = nil then
begin
lthisPageClass := TIWAppFormClass(FindClass('T' + aFormName));
Result := lthisPageClass.Create(aWebApplication);
end
else
Result := lthisPage;
end;
with TfrmClaim(fxGetForm(WebApplication, 'frmClaim')) do -> frmClaim represents some page to move to
begin
BeforeShow;
Show; -> this is where the error occurs, but the error only occurs if the "lthisPage" in the fxGetForm function is nil and thus forces the creation of a new page.
end;
Sorry about the last tripple post. (I am not sure why it keeps reposting the same item.)
I just realized that the previous post was wrong.
It should say.
with TfrmClaim(fxGetForm(WebApplication, 'frmClaim')) do -> frmClaim represents some page to move to
begin
BeforeShow;
Show; -> this is where the error occurs, but the error does not error occur if the "lthisPage" in the fxGetForm function is nil and thus forces the creation of a new page.
end;

