Board index » cppbuilder » write linkable components in BCB 6 doesn't work

write linkable components in BCB 6 doesn't work

if you have an actualization of BCB 6 pro or ent you can't compile delphi code.  :-(((  (I'm sure they solve it in the future, but is a big problem).

But... not only that.

I have some components (fully BCB) with published propertys of pointers to others componets (also BCB). The IDE only can work (show in object inspector), when both components are in the same unit.

It works fine in BCB3, BCB4 and BCB5.

 

Re:write linkable components in BCB 6 doesn't work


Not in my copy of BCB6.  I created a new component the descends from TDataSource
and add a second Dataset property like

class PACKAGE TDatasource1 : public TDataSource
{
private:
  TDataSet *FDataSet2;
protected:
public:
        __fastcall TDatasource1(TComponent* Owner);
__published:
        __property TDataSet* DataSet2 = {read=FDataSet2, write=FDataSet2};

Quote
};

The I created a TDataModule drop a ClientDataset on it, on the main form dropped
a TDataSource1.  Included the Unit hdr for TDataModule1.  Then I can assign both
the Pascal introduced DataSet property and the DataSet2 property that is only
C++ introduced to the ClientDataSet that resides in a different unit without
problems.

Quote
jose wrote:

> if you have an actualization of BCB 6 pro or ent you can't compile delphi code.  :-(((  (I'm sure they solve it in the future, but is a big problem).

> But... not only that.

> I have some components (fully BCB) with published propertys of pointers to others componets (also BCB). The IDE only can work (show in object inspector), when both components are in the same unit.

> It works fine in BCB3, BCB4 and BCB5.

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
This sad little lizard told me that he was a brontosaurus on his mother's
side.  I did not laugh; people who boast of ancestry often have little else
to sustain them.  Humoring them costs nothing and ads to happiness in
a world in which happiness is in short supply.   (RAH)

Re:write linkable components in BCB 6 doesn't work


The linkable object is written in BCB, but you publish the parent object written in Delphi.

Try to publish an object descendent of TComponent and writted in BCB.

//  Unit1
class PACKAGE TLinkable : public TComponent {
..

Quote
};

// Unit2
class PACKAGE TExample : public TComponent {
..
__published:
  TLinkable* LinkExample = { read=FLinkOther, write=FLinkOther }

Quote
};

And the result is diferent (and worse) if you write...
  TLinkable* LinkExample = { read=ReadLinkOther, write=WriteLinkOther }

The code I tested, works fine in BCB 4 and BCB 5

I think that Builder publish this property like TPropertyClass instead of TPropertyComponent

Thanks a lot

Re:write linkable components in BCB 6 doesn't work


Sorry, I send again this problem because I didn't explain correctly before.

I have some components (fully BCB) with published propertys of pointers to others componets (also BCB). The IDE only can work (show in object inspector), when both components are in the same PACKAGE.

Note that I publish de pointer to the component writted in BCB not a parent.

It works fine in BCB3, BCB4 and BCB5.

Try to publish an object descendent of TComponent and writted in BCB.

//  Unit1  in PACKAGE 1
class PACKAGE TLinkable : public TComponent {
..

Quote
};

// Unit2 in PACKAGE 2
class PACKAGE TExample : public TComponent {
..
__published:
  TLinkable* LinkExample = { read=FLinkOther, write=FLinkOther }

Quote
};

And the result is diferent (and worse) if you write...
  TLinkable* LinkExample = { read=ReadLinkOther, write=WriteLinkOther }
//  Access by method

I think that Builder 6 publish this property like TPropertyClass instead of TPropertyComponent

Other Threads