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

  • SEARCH
  • Home
  • 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 8161947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:36:21+00:00 2026-06-06T18:36:21+00:00

I tried to copy and paste a component from one data module into another

  • 0

I tried to copy and paste a component from one data module into another in Delphi XE2. The component was a Fast Report data source link component. The data module was brand new, just created that second, in XE2.

Someone else had the same problem and reported it on quality central as 106369 and same error message leading me to this mysterious DocWiki entry.

So data modules now have a framework affinity, and a designtime-only pseudo property, which according to the docs:

“Because the ClassGroup pseudo-property is used only by the IDE and is not a compiler-generated property (hence, ‘pseudo-property’), ClassGroup is not documented in the compiler-generated Libraries Reference. The page you are reading is the documentation for ClassGroup.”

So, the first time I even learn this exists is when it blocks me from copy and pasting components into my data module from an existing set of designtime building blocks that I didn’t wish to rebuild from scratch.

Once I change the data module affinity, I can paste stuff into data modules without it bugging me. Thank goodness for Google-that-error or I’d be stuck.

If it is intended to help us write cross platform data modules, and yet it only affects the IDE, according to the documentation, that’s inconsistent with the warning that you get when you play with this at designtime, here’s the error you get if you change it:

 EInvalidType : The following component(s) are not available in the specified 
 class group. This is likely to cause compile or runtime errors. 
 frxDBSet.TfrxDBDataset.

What I can’t see is how that error message can be correct, and the documentation can also be correct.

The warnings seem to suggest compile, link, and runtime errors if this is set incorrectly. Curious minds who want to know what’s really going on, want to know: What is this thing about and why did it get added to the data modules in XE2. I anticipate other people will stumble upon this weird feature, with the feeling that they’ve stepped in something like dinosaur droppings, and want to know what is up with this feature.

My best answer at this point is that a data module affinity for TPersistent which means, in XE2 lingo, that this data module doesn’t want non-visual controls in it, that are VCL-specific. In a future version of Delphi, perhaps a similar marker would allow us to mark forms as being “clean of dependencies on the VCL or windows” too?

Update 1: The .PAS source code of your data module stores this pseudo-property in a way that looks a bit like a compiler directive, like this:

implementation

{%CLASSGROUP 'Vcl.Controls.TControl'}
  • 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-06T18:36:23+00:00Added an answer on June 6, 2026 at 6:36 pm

    I think it is pretty obviously what its intended use is for, and the documentation you link to is pretty extensive about that purpose.

    It is meant to prevent VCL-only components from being placed on a FireMonkey-accessible DataModule, and vice versa.

    Since TDataModule is initially framework-neutral, only framework-neutral components can be placed on it.

    So obviously, your source DataModule has a different affinity than your new DataModule, which is why copy/paste does not work until you change the affinity of the new DataModule to match the affinity of the source DataModule.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to copy this example from this Multiprocessing lecture by jesse noller (as
I tried to copy any dir from my server to client's pc but i
i have tried to copy euro symbol from Wikipedia...and echo it (in my parent
I would like to have more than one button. I tried to copy code
I tried to make an independent copy of an array but couldnt get one.
I am using VS 2008. I want to copy a formula field from one
Can I get some help interpreting / implementing the answers at: Copy/Paste from Excel
A user complains they can't paste into one particular text box on a form
I'm using the Infragistics UltraWinGrid to present some data. I need some Excel copy/paste
i tried to do some practise about form actions and inputs and copy-paste a

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.