BCB problems

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
aby
Posts: 81
Joined: 21 May 2007, 13:02
Location: Turkey

BCB problems

Post by aby » 04 Feb 2008, 19:39

I've asked this question to support but get no answer, may be in this forum some one could help me.

TsgDXFImage *DXFImg = dynamic_cast<TsgDXFImage *> (FDNavigator->Picture->Graphic);
if (DXFImg) {
DXFImg->SetMatrixMode(smEnabled);
FDNavigator->Update();
}

The compiler is giving an error.
TsgDXFImage::SetMatrixMode is not accessible.

The suppplier of this program is suggesting, in DXFImage.pas to move the methods to public and compile it, pragmatically imposible to compile.

I 've asked this questions and nobody get answered. May be in this forum they can answer.

Thanks

Aby

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 05 Feb 2008, 16:26

Hello Aby,

We have already sent you e-mail with the answer.

Sergey.

Please post questions to the forum or write to support@cadsofttools.com

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 06 Feb 2008, 09:08

Hello Aby,

Access to the protected class members in common case is available only from descendants of this class. Delphi has some of such ways which are used in Editor demo. But C++ can't use them. That is why it is necessary to lift a visibility scope of TsgDXFImage::SetMatrixMode property to public, when there is a need to get access to it. We suggest to use the following way:

Code: Select all

class TsgDXFImageAccess : public TsgDXFImage
{
  public:
    __property SetMatrixMode;
};

TsgDXFImageAccess *DXFImg = dynamic_cast<TsgDXFImageAccess *> (FDNavigator->Picture->Graphic);
if (DXFImg) 
{
  DXFImg->SetMatrixMode(smEnabled);
  FDNavigator->Update();
}
Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Post Reply