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 157321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:28:59+00:00 2026-05-11T10:28:59+00:00

I have the following two classes: TcmTPDataPanel = class(TcmTPBasePanel) Database: TnxDatabase; Session: TnxSession; private

  • 0

I have the following two classes:

TcmTPDataPanel = class(TcmTPBasePanel)     Database: TnxDatabase;     Session: TnxSession;   private     FDataConnector: TcmTPDataConnector;     MyNxDataBase: TnxDatabase;     MyNxSession: TnxSession;     MyRefNxDataBase: TnxDatabase;   protected     procedure Disconnect; virtual; abstract;     procedure Refresh; virtual;     procedure Requery; virtual; abstract;   public     procedure Connect;   published     property DataConnector: TcmTPDataConnector read FDataConnector write         FDataConnector;   end;   TcmTPDataConnector = class(TComponent)   private     FDatabase: TnxDatabase;     FObservers: TList;     FTableForCategories: TnxTable;     FTableForItemCategoryLinks: TnxTable;     FTableForItems: TnxTable;     procedure SetTableForItemCategoryLinks(const Value: TnxTable);   protected     procedure IterateObservers;   public     constructor Create;     destructor Destroy; override;     procedure Register(Instance: TcmTPDataPanel);     procedure Unregister(Instance: TcmTPDataPanel);   published     property Database: TnxDatabase read FDatabase write FDatabase;     property TableForCategories: TnxTable read FTableForCategories write         FTableForCategories;     property TableForItemCategoryLinks: TnxTable read         FTableForItemCategoryLinks write SetTableForItemCategoryLinks;     property TableForItems: TnxTable read FTableForItems write FTableForItems;   end; 

TcmDataPanel is a (3rd generation) TFrame descendent. It’s not used directly, but rather multiple other compound components descend from it.

TcmDataConnector is a component which holds the database connection information for these other components.

I’m using ModelMaker, and am trying to implement an Observer pattern so that multiple ‘Data Panels’ can be automatically updated whenever the ‘Data Connector’ changes state.

Here’s my problem: I can’t seem to get around the ‘circular refernece’ problem, as each class uses the other in the Interface section. Putting the associated ‘uses’ reference in the Interface section doesn’t clear up the ‘Undeclared identifier’ issue, and putting them both in the same unit doesn’t either. Right now they are in the same unit (I’ve tried them in separate units, and together), and I get the ‘Undeclared identifier: TcmTPDataConnector’ error.

How can I get around this?

================
UPDATE:

It’s Friday night at 9:30pm where I am, and I was totally stuck. Just MINUTES after my post, you people SAVED THE DAY!! (night!) THANK YOU!!

Man, I love StackOverflow…. SO my friend in this learning-like-crazy season. : ) Thank you, thank you, thank you…

  • 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. 2026-05-11T10:29:00+00:00Added an answer on May 11, 2026 at 10:29 am

    On the same unit, try the following:

    TcmTPDataConnector = class(TComponent);   TcmTPDataPanel = class(TcmTPBasePanel)    ...  end;  TcmTPDataConnector = class(TComponent)   ... end; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have following two classes: class Temp{ public: char a; char b; };
I have the following two classes: package { import flash.display.Sprite; import flash.events.Event; public class
I have the following two classes: import java.io.*; import java.util.*; public class User {
I have the following two classes, one inherits from the other Class A{ void
I have the following two classes: public class Address { public string AddressLine1 {
I have the following two classes: public class User { public Integer userId; //
Say i have the following two classes: public class User { public int ID
I have the following two classes. class Settings { function __CONSTRUCT() { echo Settings
Let's say I have the following two classes: public class Person { public string
Let's say, I have the following two classes: class A(object): def __init__(self, i): self.i

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.