Edward Diener Guest
|
Posted: Fri Aug 15, 2003 2:09 am Post subject: Registering property editors |
|
|
I asked this question on the appropriate C++ Builder NG but since no one
responded, I will try here and see if anyone might have some idea what I am
doing wrong.
I am registering four property editors in BCB6. The first three were working
in BCB3, BCB4, and BCB5, I never implemented the last on those releases, but
in BCB6 the last three of the four are not working. I know that BCB6 changed
the design editor editor file names, and I am picking up the latest ones,
but I am wondering if anything else changed to circumvent property editors
somehow, or if there is a known bug on the issue. I couldn't find anything
about it in QC.
Here is a sample:
First a property for double.
class PACKAGE DoublePropertyType : public System::TObject
{
__published:
__property double DoubleProperty = {read = DDummy, write = DDummy };
private:
inline __fastcall DoublePropertyType() {}
double DDummy;
};
Then two property editors using the above.
RegisterPropertyEditor(*(Typinfo::GetPropInfo(__typeinfo(DoublePropertyType)
,"DoubleProperty") -> PropType),
__classid(ANamespace::AComponent),"Minimum",__classid(MinMaxPropertyEditor))
;
RegisterPropertyEditor(*(Typinfo::GetPropInfo(__typeinfo(DoublePropertyType)
,"DoubleProperty") -> PropType),
__classid(ANamespace::AComponent),"Maximum",__classid(MinMaxPropertyEditor))
;
The final one is for a text field:
RegisterPropertyEditor(*(Typinfo::GetPropInfo(__typeinfo(TEdit),"Text") ->
PropType),
__classid(ANamespace::ATPersistentClass),"Grouping",__classid
GroupingPropertyEditor));
I have checked that the RegistryPropertyEditor gets called but when I am
trying to edit ANamespace::AComponent's Minimum or Maximum property, the
routines for MinMaxPropertyEditor never get called. Similarly the routines
for GroupingPropertyEditor never get called when I am trying to edit the
ANamespace::ATPersistentClass object's Grouping property which is embedded
in one of my components.
Any ideas or thought why this is not working ?
My only thought on the first two cases is that BCB6 has somehow locked all
properties of type 'double' to the IDE's property editor, not allowing me to
override it with my own. Is that possible ?
In the last case, perhaps I can't add a property editor for a TPersistent
class's __property, although why that would be I do not know.
|
|