Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Form inheritance
Thu, Jun 13 2013 10:13 AMPermanent Link

lejetou

Hi,

I'm playing with EWB since 3 weeks and really enjoy it.
But I'm trying to inherit forms and I'm stuck with IDE and run-time problems.

My web app shows a DB content.
I've designed a form (FrmDBList) showing a table content like this :
   - a Dataset
   - a DBGrid displaying the dataset content
   - a panel at the form bottom
   - a button in the panel to close the form.
   
I wanted to use this form for all my tables.

So I've designed my other forms (one for each table) all inherited from TFrmDBList.
Let's say TFrmAlbums to display contents of Albums table (from demo).

First problem, at design time (inside EWB IDE), controls (Dataset, DBGrid, Panel,Button) on TFrmAlbums are not displayed.

Next, problem at run-time, controls are displayed but all form properties (like caption, height, etc..) are taken from TFrmDBList class.
I've noticed that if the property is not defined in TFrmDBList, it's taken from TFrmAlbums.

My understanding is :
At design time, TFrmAlbums is displayed using TFrmAlbums.wbf information.
At run time, a FrmAlbums instance is displayed using TFrmAlbums.wbf merged/overwritten with TFrmDBList.wbf information.

If when I start the design of my TFrmAlbums class I can tell EWB IDE that it inherit from TFrmDBList form, it will be able at design time and run time to display FrmAlbums using TFrmDBList.wbf information merged/overwritten using TFrmAlbums.wbf information.

At design time, the IDE will be able to display all controls from TFrmBDList.
Form and controls properties can be changed, because all control-properties changes (and only changes) will be written in TFrmAlbums.wbf.
This could works at design time as well as run time.

Hope I'm clear enough Smile

I'm not sure of all of this as I'm a EWB noob, it's just an idea.

If there is already a way to do form inheritance, please let me know.

Best regards.
Fri, Jun 14 2013 2:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

lejetou,

<<  First problem, at design time (inside EWB IDE), controls (Dataset,
DBGrid, Panel,Button) on TFrmAlbums are not displayed. >>

Neither the run-time or design-time environment supports form inheritance at
this time, so you're not going to have much success trying to do so.

Tim Young
Elevate Software
www.elevatesoft.com
Image