BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Registering property editors

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing
View previous topic :: View next topic  
Author Message
Edward Diener
Guest





PostPosted: Fri Aug 15, 2003 2:09 am    Post subject: Registering property editors Reply with quote



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.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Writing All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.