Jump to content

property from another class

- - - - -

  • Please log in to reply
6 replies to this topic

#1
jaiii

jaiii

    Learning Programmer

  • Members
  • PipPipPip
  • 45 posts
Hi,

I have defined component like this

class PACKAGE tbtable : public TComponent
{
private:
AnsiString FFilename
protected:
public:
__property AnsiString FileName {read=FFileName,write=FFileName};

}
this class is registred.

and class:

class Package TIndex : public TList;
{
public:
void __fastcall SaveToFile;
}

I allways get error unknown property FileName.
How can I use property FileNmame in metod SaveToFile ?

Thank for any help.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
You're asking about something with Borland (or Embarcadero, or CodeGear)'s odd version of C++ Builder. You may do better to ask on some of their sites, as it isn't very common knowledge here.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
WTF? I've never seen this in my life. Is this the only error you're getting? Sometimes one error triggers a cascade of other seemingly unrelated errors.
sudo rm -rf /

#4
jaiii

jaiii

    Learning Programmer

  • Members
  • PipPipPip
  • 45 posts
I tought this is not clear write :

I have one cource code for my own component TBTable (in One sourcen I have to component TBtable is main is registred and TIndex is only additive for Index of TBTable) an in this cource code I have defined 2 clases:

TBTable:TComponent an TIndex : TList
in the TBTable I have property FileName
Both components have own definition.
iIf I wont to use property FileName use in TIndex I get error undefined symbol
if I try TBTable->FileName->FileName I get error improper use of TBTable and
if I try TBTable::FileName I get error missing object.

thank for help

#5
jaiii

jaiii

    Learning Programmer

  • Members
  • PipPipPip
  • 45 posts
I resolved my problem.
Thankx for help a yours tim.
By.

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,717 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Well, I'm glad that got fixed. Not too many people use Turbo C/C++ anymore. I think Borland quit supporting it a while ago.
sudo rm -rf /

#7
jaiii

jaiii

    Learning Programmer

  • Members
  • PipPipPip
  • 45 posts

dargueta said:

Well, I'm glad that got fixed. Not too many people use Turbo C/C++ anymore. I think Borland quit supporting it a while ago.

Yes I agry for me is C++ the best programing laguage.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users