Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0014835 [Lazarus] IDE minor always 2009-10-17 23:22 2010-07-17 10:26
Reporter Luiz Americo View Status public  
Assigned To Mattias Gaertner
Priority normal Resolution open  
Status confirmed   Product Version
Summary 0014835: Property of a frame child control is reset in the frame parent
Description Steps to get the error:

1) Create an empty project
2) Save the project
3) Create a frame and add a TDbf component. Save all
4) Add the frame to the form and some code to check the dbf1.tablename property. Save all
5) Run the project. Tablename is ""
6) Change Dbf1.Tablename property to "newtablename". Save all
7) Run the project. Tablename is "newtablename"
8) Resize the form1. Save all.
9) Run the project. Tablename is ""

In TForm1, the Dbf1.Tablename property is override with "". See the lfm file.

Attached is the resulted project of the above steps.

Lazarus 0.9.29 r22198 FPC 2.2.4 i386-win32-win32/win64
Additional Information
Tags No tags attached.
Fixed in Revision
LazTarget 1.2
Widgetset
Attached Files zip file icon FrameError1.zip [^] (3,502 bytes) 2009-10-17 23:22

- Relationships
related to 0012483assignedMattias Gaertner Changes in a frame is not propagated at design time 

-  Notes
(0031559)
Luiz Americo (developer)
2009-10-21 20:21

I'd like to point that this is not a corner case bug. I've been using frames extensively since when it was implemented and i hit this bug several times. In fact it leads to strange behaviors (events not firing, data controls not showing content) that are difficult to debug (i lost some hours with such bugs) even to someone with some knowledge of Lazarus/LCL (i use Lazarus since when the win32 version led to a blue screen of death).
So i think that the bug should be targeted to the next release because as soon as people use this feature, they will get in trouble.
(0033321)
Paul Ishenin (manager)
2009-12-26 05:19

Imo this was fixed. Is it so for you, Luiz?
(0033335)
Luiz Americo (developer)
2009-12-26 18:34

This is issue is still present. I executed again the steps above with the same result and i'm getting this problem in my projects frequently since i use a lot frames.
(0033403)
Mattias Gaertner (manager)
2009-12-30 21:14

I open the attached project.
I remove the '' line.
I open the designer, resize, save.
No '' line is created.
Run project: Tablename is "newtablename"

This means: I can not reproduce the issue with FPC 2.5.1.

Luiz: please test with fpc 2.5.1.
(0039350)
Paul Ishenin (manager)
2010-07-15 14:00

This is not the frames problem. This is the problem of VFI. When you change something on a frame all opened inherited components must update. In the example Luiz has inseted the frame to the form. At that moment dbf1 on the frame had tablename = "". Then Luiz has changed the tablename on the ancestor frame and descendant on the form had not changed the property from "" to "newtablename" accordinly the ancestor change. At that moment IDE did not notice the change on the form and did not save it - as result he saw "newtablename" after the run. When he resized the form IDE noticed the form change and during the saving it compared the "" value on the frame descendant with "newtablename" on ancestor. As result IDE had found the difference and saved it. The second run had showed that.

To solve the problem we need to implement an update mechanism for open descendants. Or at least ask users to close their forms during the ancestor update :)
(0039398)
Mattias Gaertner (manager)
2010-07-16 21:33

The missing update is documented.
Implementing it is a new feature and will probably create new bugs. I think target should be set to 1.2.

- Issue History
Date Modified Username Field Change
2009-10-17 23:22 Luiz Americo New Issue
2009-10-17 23:22 Luiz Americo File Added: FrameError1.zip
2009-10-20 21:21 Vincent Snijders LazTarget => 1.0
2009-10-20 21:21 Vincent Snijders Assigned To => Mattias Gaertner
2009-10-20 21:21 Vincent Snijders Status new => assigned
2009-10-20 21:21 Vincent Snijders Target Version => 1.0.0
2009-10-21 20:21 Luiz Americo Note Added: 0031559
2009-12-26 05:19 Paul Ishenin LazTarget 1.0 => 0.9.30
2009-12-26 05:19 Paul Ishenin Note Added: 0033321
2009-12-26 05:19 Paul Ishenin Status assigned => feedback
2009-12-26 05:19 Paul Ishenin Target Version 1.0.0 => 0.9.30
2009-12-26 18:34 Luiz Americo Note Added: 0033335
2009-12-30 21:14 Mattias Gaertner Note Added: 0033403
2010-07-15 14:00 Paul Ishenin Note Added: 0039350
2010-07-15 14:00 Paul Ishenin Status feedback => confirmed
2010-07-16 21:33 Mattias Gaertner Note Added: 0039398
2010-07-17 10:26 Mattias Gaertner Relationship added related to 0012483
2010-07-17 10:26 Mattias Gaertner LazTarget 0.9.30 => 1.2



Mantis 1.1.1[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker