Board index » cppbuilder » Load/Save component property

Load/Save component property

Hy,

I would like to create a new component : TcompatibilityList

With a CompatibilityList property (CompatibilityList is a int table "
CompatibilityList[16][16]")

class PACKAGE TCompatibilityList : public TComponent

{

private:

.

        int** FCompatibility;

protected:

..

    void __fastcall SetCompatibilityList(int** ECompatibilityList);

public:

.

  __property int** CompatibilityList ={read=FCompatibility,
write=SetCompatibilityList};

__published:

Quote
};

To setup the table, I click on "CompatibilityList" property and a table is
displayed. Actualy that work.

But when I quit my project, the table value are not saved.

How can I save this table when I close a project and restore it when I load
the project?

Thanks

 

Re:Load/Save component property


Override your component's DefineProperties() method and call the Tfiler's
DefineBinaryProperty() method to provide custom reading and writing handlers
for managing the data yourself.

Gambit

Quote
"Emmanuel RIVIERE" <emmanuel.rivi...@NetTest.com> wrote in message

news:3c061c6b$1_1@dnews...

Quote
> I would like to create a new component : TcompatibilityList

> With a CompatibilityList property (CompatibilityList is a int table "
> CompatibilityList[16][16]")
<snip>
> But when I quit my project, the table value are not saved.

Other Threads