Recent

Author Topic: Issue with tpagecontrol on QT  (Read 3265 times)

snorkel

  • Hero Member
  • *****
  • Posts: 789
Issue with tpagecontrol on QT
« on: October 19, 2012, 08:08:04 am »
I have a app where I dock forms in the tpagecontrol, and in the onclosetabclick event
I do this:
Code: [Select]

var
  aform:tform;
begin
     //free the form
     aform:=tform(mdi_page_control.ActivePage.Controls[0]);
     aform.Close;
end

and it raises a access violation in wincontrol.inc on line 6296 in function TWinControl.GetControl(const Index: Integer): TControl; 

The exception is only raised if it's the last tab in the tabsheet, if I have more than one tab open with the docked form they all close until the last one.


This works fine on GTK2 and in Win32/64.

I am running Lazarus 1.0.2 on Kubuntu.

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit

zeljko

  • Hero Member
  • *****
  • Posts: 1050
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Issue with tpagecontrol on QT
« Reply #1 on: October 19, 2012, 01:20:51 pm »
open an issue about it and ATTACH VALID EXAMPLE.

snorkel

  • Hero Member
  • *****
  • Posts: 789
Re: Issue with tpagecontrol on QT
« Reply #2 on: October 19, 2012, 04:22:42 pm »
Ok, will do.  Will post it here as well.

Just for kicks I compiled the IDE with QT on windows and the same error is raised there as well.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 1.8 and FPC 3.0.4
OS: Windows 10 64 bit