Page 1 of 1

Cant use TXMLDocument with MYDAC components (maybe a bug??)

Posted: Wed 10 Aug 2005 12:13
by mikrodidakt
Hi
I am using Cbuilder and when I am using TXMLDocument with MyConnection i get error in the code that the XML databinding wizard has generated.

[ERROR]

[C++ Error] satiety.h(75): E2015 Ambiguity between 'TNodeType' and 'Xmlintf::TNodeType'
[C++ Error] satiety.h(75): E2113 Virtual function '_fastcall TXMLsatietycurveType::GetNodeType()' conflicts with base class 'IXMLNode'
[C++ Warning] satiety.h(75): W8006 Initializing TNodeType with Xmlintf::TNodeType
[C++ Error] satiety.h(92): E2015 Ambiguity between 'TNodeType' and 'Xmlintf::TNodeType'
[C++ Error] satiety.h(92): E2113 Virtual function '_fastcall TXMLValueType::GetNodeType()' conflicts with base class 'IXMLNode'
[C++ Warning] satiety.h(92): W8006 Initializing TNodeType with Xmlintf::TNodeType

[/ERROR]

is this a bug :?:
It only happens with MYDAC components. If I remove the component the error is still there no mather what i do.

Posted: Wed 10 Aug 2005 13:49
by mikrodidakt
I did another application to see if i could figure out what is wrong, the behavier this time is diffrent.
But the error is still appering only when I am using the MyDAC.

[ERRO]
[C++ Error] satiety.h(75): E2015 Ambiguity between 'TNodeType' and 'Memdata::TNodeType'
[C++ Error] satiety.h(92): E2015 Ambiguity between 'TNodeType' and 'Memdata::TNodeType'
[/ERROR]

now this error only occurs when i include satiety.h file.
satiety.h file is a file that the xml databinding wizard is creating

satiety.h

Code: Select all

class TXMLsatietycurveType;
class TXMLValueType;

// TXMLsatietycurveType

class TXMLsatietycurveType : public TXMLNodeCollection, public IXMLsatietycurveType
{
  __IXMLNODECOLLECTION_IMPL__ [b][i][u]//the first error appear here[/u][/i][/b]
protected:
  // IXMLsatietycurveType 
  virtual WideString __fastcall Get_Title();
  virtual _di_IXMLValueType __fastcall Get_Value(int Index);
  virtual void __fastcall Set_Title(WideString Value);
  virtual _di_IXMLValueType __fastcall Add();
  virtual _di_IXMLValueType __fastcall Insert(const int Index);
public:
  virtual void __fastcall AfterConstruction(void);
};
// TXMLValueType
class TXMLValueType : public TXMLNode, public IXMLValueType
{
  __IXMLNODE_IMPL__ [b][i][u]//the seconde error appeare here[/u][/i][/b]
protected:
  // IXMLValueType 
  virtual WideString __fastcall Get_Title();
  virtual int __fastcall Get_XValue();
  virtual WideString __fastcall Get_YValue();
  virtual _di_IXMLValueType __fastcall Get_Value();
  virtual void __fastcall Set_Title(WideString Value);
  virtual void __fastcall Set_XValue(int Value);
  virtual void __fastcall Set_YValue(WideString Value);
public:
  virtual void __fastcall AfterConstruction(void);
};


Posted: Wed 10 Aug 2005 14:22
by mikrodidakt
Hi
I found in your MemData.hpp file a enum called TNodeType.
The TXMLDocument is using a enum called TNodeType to define a a node in an XML document. :!: :!:

Posted: Wed 10 Aug 2005 14:36
by mikrodidakt
I changed the enum in MemData.hpp to TXMyNodeType and it worked.
I changed it to TXMyNodeType because i tought that it was not that likely
that u have another enum with that name but if i am wrong please let me know.
:wink:
Thanks.

Posted: Thu 11 Aug 2005 13:04
by Paul
Yes, It is MyDAC internal type and you can rename it in your copy of header. We will fix this problem in the future