Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8674687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:46:05+00:00 2026-06-12T19:46:05+00:00

I tried to construct a class system in Delphi. The classes TFieldSpec and TTableSpec

  • 0

I tried to construct a class system in Delphi. The classes TFieldSpec and TTableSpec refer to each other through object properties.

type
  TFieldSpec=class(Tobject)
  private
    FTableSpec : TTableSpec;
  public
    property TableSpec : TTableSpec read FTableSpec;
  end;

  TTableSpec=class(Tobject)
  private
    FFields : array[1..100] of TFieldSpec;
  end;

When I compile this, I get this error:

[Error] Objects.pas(66): Undeclared identifier: 'TTableSpec'

How to construct these class types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:46:06+00:00Added an answer on June 12, 2026 at 7:46 pm

    You should use forward declaration of TTableSpec:

    type
      TTableSpec = class;
    
      TFieldSpec=class(Tobject)
      private
        ..
        FTableSpec : TTableSpec;
        ..
      end;
    
      TTableSpec=class(Tobject)
      private
        FName : string;
        ..
      end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created three classes: Shape (base class) , Rectangle and Square . I tried
I need to construct a long string with javascript. Thats how i tried to
I'm using a java based uploading construct http://www.javaatwork.com/java-upload-applet/details.html that I tried running over night.
I'm trying to create a user management system class and one of my functions
I am trying to check a valid Regex expression, with this class: using System.Text.RegularExpressions;
Hmm, I have a money object that allows me to add other money objects
This is for Delphi Prism. Say, I have the following enum SET type that
Fatal error: Class 'Controller' not found in <local_path>\system\application\controllers\welcome.php on line 3 <?php class Welcome
I have made a little CQRS API for our system I tried to replace
I' ve tried combining the module pattern with a constructor function but it seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.