Thread View: borland.public.intrabuilder.forms
1 messages
1 total messages
Started by Werner Renhardt
Thu, 06 Aug 1998 00:00
Troubles with forms-designer and user-defined classes
Author: Werner Renhardt
Date: Thu, 06 Aug 1998 00:00
Date: Thu, 06 Aug 1998 00:00
76 lines
3224 bytes
3224 bytes
I have designed a userdefined 'class myQuery' extended from the class
Query.
It is similiar with the example in the TMD-Example (named 'meldungQuery'
in the German Version of the manual, 'messagesQuery' in English) from
IntraBuilder.
P R O B L E M: After using the forms-designer and "editing" the source
of my form 'testFrom', the forms-designer adds a lot of unneeded
properties.
I've made a form 'testForm', that uses a 'myQuery' Object.
When I edit the source of 'testForm' m a n u a l l y , it looks like
this:
(and I have no troubles executing this)
************* Source of: testForm ************
class testForm extends Form
{ [...]
with (this.myQuery1 = new myQuery())
{ database = parent.database1;
active = true;
// after setting property: active = true
// the event 'onOpen' of myQuery1 is executed
// which initializes the query
}
this.rowset = this.myQuery1.rowset;
}
************* End Source of: testForm ************
But after editing the form with the forms-designer, and save the edits
I've made, the source looks like this:
a lot of unneeded properties are saved :-(
************* Source of: testForm ************
class testForm extends Form
{ [...]
with (this.myQuery1 = new myQuery())
{ onOpen = class::onOpen;
left = 61;
top = 0;
database = parent.database1;
sql = 'SELECT * FROM "table.db"';
active = true;
}
with (this.myQuery1.rowset)
{
fields["calcfield"].beforeGetValue =
class::calcfield_beforeGetValue;
autoEdit = false;
indexName = "ID";
}
this.rowset = this.myQuery1.rowset;
}
************* End Source of: testForm ************
If I want to execute the form 'testForm' it generates an error in line
"fields["calcfield"].beforeGetValue = class::calcfield_beforeGetValue;"
Another "minus" is, that there is a lot of duplicate code in the form
'testForm' and the definition of 'myQuery'.
-> EveryTime I edit the form with the forms-designer I have to clean up
the source manually.
??? Is there a possibility to prevent the addings made of the
forms-designer ???
There exists a keyword 'custom' that i used with the class-definition of
'myQuery'.
But the keyword only works with property-settings in the with(this) -
section of a userdefined class.
There is only little "help-information" about 'custom' in the manual.
The only thing I've found about 'custom' is in chapter 14 page 3 in the
German version of the IntraBuilder manual ("userdefined forms and
comnponents").
Thanks
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads