|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 11 to 14 of 14 total|
|TPaint / Canvas|
|Sun, May 22 2016 10:46 AM||Permanent Link|
On 5/22/2016 6:36 AM, thomh wrote:
> I created a simple test application with just a form. I use this code to create some TBasicPanel controls.
> The FStartX and FStartY are just variables set in the OnMouseDown event of the form.
> I get the same error with or without assigning the .Parent property.
I suspect the issue is due to you freeing the panel while it's being
processed as sender for the event.
Tim can address as to why on framework level but one workaround i would
suggest is to use the async call to queue up the panel delete as next UI
So something like this :
Add a new procedure DeletePanel that basically does the panel lookup by
tag and actual freeing :
for i := Form1.ControlCount - 1 downto 0 do
c := Form1.Controls[i];
if (TControl(c) is TBasicPanel) and (TControl(c).Tag = PanelTAG) then
and then change the event you trigger this (i.e. mouseclick or whatever) :
if Sender is TBasicPanel then
|Sun, May 22 2016 12:33 PM||Permanent Link|
That was indeed the problem, Raul!
Thanks for your help everybody.
|Mon, May 23 2016 1:04 PM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< which results in error:
"Unable to get property 'tcomponent_fdestroying' of undefined or null reference
Line 12448" >>
Modify the WebUI unit as follows:
function TElement.TriggerEvent(ID: Integer; AElement: TElement): Boolean;
if Assigned(FController) and (not FController.Destroying) then <<<<< Changed !!!!
if (ID=cdInput) then
and let me know if that fixes the issue.
Either way, please send me a project that includes the code that you're using so that I can test it here. This issue is one that "shouldn't occur" in a single-threaded environment, which is how the UI is running in a browser.
|Tue, May 24 2016 9:47 AM||Permanent Link|
Tim Young [Elevate Software] wrote:
>>Modify the WebUI unit as follows:
>>function TElement.TriggerEvent(ID: Integer; AElement: TElement): Boolean;
>> if Assigned(FController) and (not FController.Destroying) then <<<<< Changed !!!!
>> if (ID=cdInput) then
Yes, this fix worked with my old code.
|« Previous Page||Page 2 of 2|
|Jump to Page: 1 2|