 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Alan Guest
|
Posted: Mon Mar 19, 2007 5:51 am Post subject: DeriveAndSubscribeNotFiring |
|
|
I have an attribute(age) that I made derived and it generated a
DeriveAndSubscribe procedure in the include file. I have an abstract
class (Person) and have a class (Employee) that I inherit from Person.
The Employee class has an attribute age: Integer and birthDate:
DateTime. When the user selects a date from the Rad Studio BoldDateEdit
control, I was wanting have the age calculated. The DeriveAndSubscribe
doesn' t fire for some reason. Do I need to add code to the form, to
get the event in the include file to fire?
TIA |
|
| Back to top |
|
 |
Dean Stow Guest
|
Posted: Mon Mar 19, 2007 8:11 am Post subject: Re: DeriveAndSubscribeNotFiring |
|
|
What are the settings on the apply changes property of the control?
Is it bapExit or bapChange.
If it is bapExit, the event will not fire until you exit the control.
On Sun, 18 Mar 2007 19:51:34 -0500, Alan <alan (AT) crowncabinetry (DOT) com>
wrote:
| Quote: | I have an attribute(age) that I made derived and it generated a
DeriveAndSubscribe procedure in the include file. I have an abstract
class (Person) and have a class (Employee) that I inherit from Person.
The Employee class has an attribute age: Integer and birthDate:
DateTime. When the user selects a date from the Rad Studio BoldDateEdit
control, I was wanting have the age calculated. The DeriveAndSubscribe
doesn' t fire for some reason. Do I need to add code to the form, to
get the event in the include file to fire?
TIA |
|
|
| Back to top |
|
 |
Alan Guest
|
Posted: Mon Mar 19, 2007 4:37 pm Post subject: Re: DeriveAndSubscribeNotFiring |
|
|
Dean:
I have tried selecting and typing a new date into the control and
tabbing to the next edit control, the event still does not fire. I also
changed the apply changes to bapChange, no luck. The form has a page
control on it, it is the page control from the Win 32 palette. I use a
Bold Reference Handle instead of a Bold List Handle for the controls
handle property on this form as well.
TIA
Dean Stow wrote:
| Quote: | What are the settings on the apply changes property of the control?
Is it bapExit or bapChange.
If it is bapExit, the event will not fire until you exit the control.
On Sun, 18 Mar 2007 19:51:34 -0500, Alan <alan (AT) crowncabinetry (DOT) com
wrote:
I have an attribute(age) that I made derived and it generated a
DeriveAndSubscribe procedure in the include file. I have an abstract
class (Person) and have a class (Employee) that I inherit from Person.
The Employee class has an attribute age: Integer and birthDate:
DateTime. When the user selects a date from the Rad Studio BoldDateEdit
control, I was wanting have the age calculated. The DeriveAndSubscribe
doesn' t fire for some reason. Do I need to add code to the form, to
get the event in the include file to fire?
TIA
|
|
|
| Back to top |
|
 |
Alan Guest
|
Posted: Mon Mar 19, 2007 5:32 pm Post subject: Re: DeriveAndSubscribeNotFiring |
|
|
Dean:
I narrowed down the problem. I have a form with a grid on it, to
display all employees I have an add and edit button on this form that
the user selects to open up another form for editing or adding a new
employee.
When the user selects the add button I create an employee object and
pass it into the reference handle, of the second form. If the user
wants to edit an employee, they select one from the grid and I pass that
object into the Reference Handle, of the second form.
It must have something to do with this setup, because the age is being
displayed in the grid on the first form just fine. Whenever I edit or
add a record, the second form does not fire the event. Any ideas?
TIA
Dean Stow wrote:
| Quote: | What are the settings on the apply changes property of the control?
Is it bapExit or bapChange.
If it is bapExit, the event will not fire until you exit the control.
On Sun, 18 Mar 2007 19:51:34 -0500, Alan <alan (AT) crowncabinetry (DOT) com
wrote:
I have an attribute(age) that I made derived and it generated a
DeriveAndSubscribe procedure in the include file. I have an abstract
class (Person) and have a class (Employee) that I inherit from Person.
The Employee class has an attribute age: Integer and birthDate:
DateTime. When the user selects a date from the Rad Studio BoldDateEdit
control, I was wanting have the age calculated. The DeriveAndSubscribe
doesn' t fire for some reason. Do I need to add code to the form, to
get the event in the include file to fire?
TIA
|
|
|
| Back to top |
|
 |
Dean Stow Guest
|
Posted: Mon Mar 19, 2007 9:40 pm Post subject: Re: DeriveAndSubscribeNotFiring |
|
|
Alan,
Forgive me if I ask obvious questions, but when I have had problems
like these, I have missed some obvious things. I also want to be sure
I have the right facts in my mind.
1. If you change the date in the grid (on an existing record), does
the age change? (From your description, I think the answer is yes)
2. If you change the date on the form, does the age change? (I think
the answer is no)
3. If you change the date on the form, does the date change on the
grid?
4. What control are you using on the form for the date?
5. What control are you using on the form for the age?
6. Are you using custom renderers?
7. Would you post your derivation code for the age here so I can see
if there is anything odd going on? (i.e. the entire derive and
subscribe method) |
|
| Back to top |
|
 |
Alan Guest
|
Posted: Mon Mar 19, 2007 10:50 pm Post subject: Re: DeriveAndSubscribeNotFiring |
|
|
Dean:
It must have been a property on the Rad Studio date edit control. I
deleted the one I had on the form and replaced, then everything worked
great.
Thanks
Dean Stow wrote:
| Quote: | Alan,
Forgive me if I ask obvious questions, but when I have had problems
like these, I have missed some obvious things. I also want to be sure
I have the right facts in my mind.
1. If you change the date in the grid (on an existing record), does
the age change? (From your description, I think the answer is yes)
2. If you change the date on the form, does the age change? (I think
the answer is no)
3. If you change the date on the form, does the date change on the
grid?
4. What control are you using on the form for the date?
5. What control are you using on the form for the age?
6. Are you using custom renderers?
7. Would you post your derivation code for the age here so I can see
if there is anything odd going on? (i.e. the entire derive and
subscribe method)
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|