PDA

View Full Version : Property modified...



ijcro
05-06-2006, 06:38 AM
Hello All!

Can anybody help me please?

I have a property, through them change type of other property (via simple property editor). And now I have to give information for Object Inspector, that other property (is TPersistent object, and is other type and is realocated) is changed. But I don't know how it do.

Please know anybody how to do? Thank you for your time

Regards

savage
05-06-2006, 08:12 AM
What happens when you update the property variable of the other property?

ijcro
05-06-2006, 11:43 AM
Setter change other property, but this property is object. Previous instance is free and new object (descentant) allocated. But Object Inspector don't know the change and no refresh it - when is expanded object property, it contain randomize characters or numbers, no default data for new instance. I think, that I have to use any similar construct via Perform() for Object Inspector message.

technomage
05-06-2006, 12:54 PM
If I remember correctly there is a Notification method that you can override to pickup changes. Not sure if this will help

Sly
06-06-2006, 09:43 AM
I don't think the Object Inspector can handle it when you destroy and create a new object for a property. Change the values of the existing object instead of destroying it and recreating it.

technomage
06-06-2006, 08:01 PM
I remember what the Notification method was for now. It was for linked components, say you have component A which has a property of component B (think DataSet and Connection) if you remove the B component from the Form the Notificaiton gets fired to inform other components of the change. I most cases this involved setting a property to nil (which the object inspector would detect).

There is a great book "The Hidden Paths of Delphi 3" by Ray Lishner which goes into programming components and pl;ugins for the Delphi IDE. Although it is way out of date, much of what it goes into is still viable for delhpi 2005/2006 and it a gold mine a information.