Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/IDE/Visual Form Inheritance    [ Add a report in this area ]  
Report #:  1521   Status: Closed
It loses the reference to external symbols
Project:  Delphi Build #:  6.240
Version:    6.0 Submitted By:   Jorge Pinetta
Report Type:  Basic functionality failure Date Reported:  6/14/2002 12:54:34 PM
Severity:    Infrequently encountered problem Last Updated: 7/23/2007 9:16:19 AM
Platform:    All versions Internal Tracking #:  
Resolution: Fixed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (10 Total Ratings)
4.40 out of 5
Total Votes: 1
Description
I have had this problem for a long time (D4, D5, D6).  
Now that I have this tool (Q.C.) I take advantage to report it.

Under certain conditions that I detail next, I lose the reference to external symbols to an unit.

This bug has already reported by:
    Jonathon Desmond
    Quasar Technology P/L
    Brisbane, Australia
in bug numbre: 24831, long time ago...


Steps to Reproduce:
Stage 1:
1) Create a form, call it something like frmTemplate
2) Place a datasource on this form
3) Save form, add it to the repository
4) Close that project

Stage 2:
1) Create a new application, remove the main form
2) INHERIT a form from the base form you placed in the repository in stage 1
3) Add a datamodule to this project
4) Place a TTable or TQuery or TClientDataSet on the datamodule (it doesn't matter which)
5) Use the datamodule from the inherited form, connect the datasource to the dataset on the datamodule. If you like you can use a TDBGrid or other component for visual representation.
6) Save this project.
7) Close All
8) Reopen this project.
9) Compile. Almost every time, the datasource on the form loses the connection to the dataset - no warning.

It seems to me that, the problem is associated with the IDE's symbols generation.
Using "Environment options/Preferences/Desktop and symbols", the problem is less obvious, but still exists!!

It's interesting to see that if the DataSource.DataSet property in PARENT form is not NIL (anything but not nil), the problem doesn't exist any more.
After that the value assigned in the child form persists and there is not any problem.

I've seen if i change the [MODULES]'s order in "DSK" file in my proyect, in order to restore the DataModules first and the Forms after, the problem is gone!!!. I've to do it  because delphi "capriciously" opens the Forms first and DataModules after that.
In my project not exists auto-create forms (only MainForm).
Workarounds
None
Attachment
None
Comments

CAS Developers at 7/20/2007 3:13:22 PM -
I followed the instructions to the letter, but could not reproduce it when using Delphi 2007

Server Response from: ETNACODE01