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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:19:56+00:00 2026-06-15T16:19:56+00:00

I have a piece of code as shown bellow : Interface section : TControlOrganizer

  • 0

I have a piece of code as shown bellow :

Interface section :

TControlOrganizer = class(TComponent)  // a kind of List of TControl
private
  FList : TList;  //Handling list of TControl
  ..............
end;

TControlHelperAdd = class // Just for separating value entered by user and value produced by code
  private
    FOrganizer : TControlOrganizer;
    FOrigValue : String;
    FUserValue : String;
end;

TControlHelper = class helper for TControl  //Basic helper for TControl
  private
    class var
      FAddProp : TControlHelperAdd;
  protected
    procedure SetOrganizer(Value : TControlOrganizer);
    function getOrganizer:TControlOrganizer;
  public
    class Constructor doinit;
    class Destructor deinit;
    procedure OrganizerChanged;virtual;
  published
    Property Organizer:TControlOrganizer read getOrganizer write setOrganizer; //Problem No.1
  end;

//Helper for CustomEdit inherited from TControlHelper
TCustomEditHelper = class helper(TControlHelper) for TCustomEdit
  protected
    procedure OrganizerChanged;override;
  end;
//TEdit : interceptor
TEdit= class(StdCtrls.TEdit)
  protected
    procedure Change;override;  //problem No.3
end;

implementation section :

{TControlHelper}

class Constructor TControlHelper.doinit;
begin
  FAddProp :=TControlHelperAdd.Create;
end;

class Destructor TControlHelper.deinit;
begin
  FreeAndNil(FAddProp);
end;

procedure TControlHelper.OrganizerChanged;
begin
end;

procedure TControlHelper.SetOrganizer(Value : TControlOrganizer);
begin
  if FAddProp.FOrganizer<>value then begin
     if assigned(FAddProp.FOrganizer) then begin
       FAddProp.FOrganizer.remove(self);
     end;
     FAddProp.FOrganizer:=value;
     if assigned(FAddProp.FOrganizer) then begin
       FAddProp.FOrganizer.Add(self);
     end;
     OrganizerChanged;  //Problem No.2
  end;
end;

function TControlHelper.getOrganizer:TControlOrganizer;
begin
  result:=FAddProp.FOrganizer;
end;

{TCustomEditHelper}
procedure TCustomEditHelper.OrganizerChanged; //problem No.2
begin
  if assigned(FAddProp) then begin
    if assigned(Organizer) then begin
      FAddProp.FOrigValue:=Text;
      FAddProp.FUserValue:=Text;
    end;
  end;
end;

{TEdit = Interceptor} 
procedure TEdit.Change; //Problem No.3
begin
  inherited Change;
  FAddProp.FUserValue:=Text;
end;

I found 3 problems that i couldn’t solve myself.

Problem 1 :
Published property property does not show up in the Object Inspector. I think I made a mistake and forgot something here.

problem 2 :
overridden method from class helper as shown above didn’t fire (didn’t work).

problem 3 :
overridden method from interceptor class as shown above didn’t fire (didn’t work).

Could anyone please help me find out what’s wrong with that?
Thanks for help and sorry for my poor English.

  • 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-15T16:19:56+00:00Added an answer on June 15, 2026 at 4:19 pm

    Problem 1

    A published property in a helper does not show up in the Object Inspector.

    That’s right. Properties declared in helpers will never appear in the Object Inspector.

    Problem 2

    Virtual methods have no effect in class helpers.

    Again, that’s by design. Although the compiler allows you to define virtual methods in helpers, it doesn’t have any effect. In order for TCustomEditHelper.OrganizerChanged to fire, TCustomEditHelper needs to be the active helper for the target object.

    Problem 3

    The Change method for my intercepted TEdit class does not fire.

    That’s because you are not instantiating the intercepted TEdit. If you instantiate the right class, the interceptor class that you define, that method will fire.

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

Sidebar

Related Questions

I have this piece of code: @Entity @Table(name = MOVERS) public class MOVers implements
I have a piece of code shown below #include <stdio.h> #include <stdlib.h> void Advance_String(char
I have a piece of ada code shown below which is a simple switch
If I have a piece of javascript code in my jsp (as shown below):
I have this piece of code below as shown . Our Application runs on
I have two OptionMenu widgets in the simple pieces of code shown below: variable
Here I have piece of code, showing example of how I want to update
I have a piece of code like this: <div id=container runat=server> <div id=parent runat=server>
I have this piece of code in a function. I want to print the
I have a piece of code that was written by someone else before the

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.