Hello. I found the following statement from the program I try to understand. Could you please let me know what it is supposed to do?
editFBG1->Value = CTG->GetFBG1()
where
- editFBG1 is a pointer to TDoubleEdit.
- It is also a _published member of TFormCT
- CTG->GetFBG1() returns a value of type double
Inside the file DoubleEdit.h, I found:
class PACKAGE TDoubleEdit : public TEdit
{
protected:
double FValue;
__published:
_property double Value = {read=FValue, write = SetValue};
};
Q1: What does editFBG1->Value = CTG->GetFBG1() means?
My understanding is that it sets Value of
type _property in the class TDoubleEdit to the
value (of type double)returned from
CTG->GetFBG1() on the right. Am I correct?
Q2: I don't really know what _property is but from the
help file, it looks like it is a property of a form
in Builder. However, I cannot find this property
field in the object inspector of the corresponding
form. I am confused. Could you please clarify?
Q3: As you see, FValue is defined in class TDoubleEdit.
However, I cannot find the variable SetValue being
defiend there. There is a protected function
void __fastcall SetValue(double val) defined in
that clas though. They are probably unrelated.
Do you think SetValue is being defined in TEdit?
Q4: Where is the class TEdit located? I can see lots of
class being listed in the class explorer. However,
I cannot find TEdit there.
Thanks.
editFBG1->Value = CTG->GetFBG1()
where
- editFBG1 is a pointer to TDoubleEdit.
- It is also a _published member of TFormCT
- CTG->GetFBG1() returns a value of type double
Inside the file DoubleEdit.h, I found:
class PACKAGE TDoubleEdit : public TEdit
{
protected:
double FValue;
__published:
_property double Value = {read=FValue, write = SetValue};
};
Q1: What does editFBG1->Value = CTG->GetFBG1() means?
My understanding is that it sets Value of
type _property in the class TDoubleEdit to the
value (of type double)returned from
CTG->GetFBG1() on the right. Am I correct?
Q2: I don't really know what _property is but from the
help file, it looks like it is a property of a form
in Builder. However, I cannot find this property
field in the object inspector of the corresponding
form. I am confused. Could you please clarify?
Q3: As you see, FValue is defined in class TDoubleEdit.
However, I cannot find the variable SetValue being
defiend there. There is a protected function
void __fastcall SetValue(double val) defined in
that clas though. They are probably unrelated.
Do you think SetValue is being defined in TEdit?
Q4: Where is the class TEdit located? I can see lots of
class being listed in the class explorer. However,
I cannot find TEdit there.
Thanks.