Page 1 of 1

NOTICE!: Cannot use same component name in different frames

PostPosted: 29 Sep 2016 22:55
by ScottWGast
Error message: "The file cannot be returned by the server"

This bug (issue, problem, undocumented feature, whatever you want to call it)... caused me much time, so I thought y'all might like a heads up.

My program has basically 1 form and everything else is done using frames on the form and frames on modal dialog boxes. The issue comes into play when you have a TIWCGJQFileDownload component on your frames. I happen to have 3 or 4 fames (of 30 or so), that have the download component named fileDownload. The problem comes into play when I create the modal dialog frame containing a "fileDownload" component (in my case, one on the form and one on a modal dialog) and then attempt to use the "fileDownload" component that resides on the form.

In any case, giving each instance of the TIWCGJQFileDownload component a unique name fixed the problem, even though the two "same-named" components reside on completely different frames.

Hope this helps someone!
Scott

Re: NOTICE!: Cannot use same component name in different fra

PostPosted: 30 Sep 2016 16:45
by Alexander Bulei
Hi ScottWGast,

Thank you for your tip/help!

Can I ask you, why you have several TIWCGJQFileDownload components?
It's a independent component and provide methods to download only.
The correct way of usage, is have only 1 component, in mainform for example, and call the available methods when need.

Best Regards.

Re: NOTICE!: Cannot use same component name in different fra

PostPosted: 02 Oct 2016 17:56
by ScottWGast
Alexander,

I appreciate your response; the only reason that I can come up with as to why I don't have a single download component on the main form is (probably) an attempt to encapsulate each of the various frames so that they don't have to reach outside themselves to perform any function.

That being said, and coming from a non-browser development environment (D1-DXE2) into browser based development, I am slowly figuring out good development techniques for browser applications. To that end, I will move the download component to the main form so that it can service all of the various frames associated with that form.

Thank you for the advice.

Scott