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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:42:14+00:00 2026-05-18T07:42:14+00:00

in Delphi 7 , declared an class and created a class from it, (in

  • 0

in Delphi 7 , declared an class and created a class from it, (in the uml meaning).

the class contains a public field type of stringlist.

after passing the object a few times, the first letter in the first row is trimed out.

how do i trace it from not happening???

the function calling that trims is

stringlist.ValueFromIndex[i];

more information?

well its something like this.

type 
  TObjectionFilterFields = class(TObject)
  private
    public
      z,x,c,v,b,n,a,s:integer;
      list1:TStringList;
      list2:TStringList;
      enum:TEnum;
      constructor Create; //override;
      destructor Destroy; //override;
  end;

now at one object we invoke create, and insert data, and pass it on.
on another object we grab the data and create a string out of it, with + concatination.

for i := 0 to list1.count-1
 sql.add(''''+list1.ValueFromIndex[i] + ''''+'hdsjkf');

envoking stringlist.Strings[i] solved it

thanks

  • 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-05-18T07:42:14+00:00Added an answer on May 18, 2026 at 7:42 am

    As far as I can understand. You have an object that contains a public field of the type TStringList.

    type
      TMyClass = class
        FField : TStringList;
      end;
    

    You have created an instance and passed it to a function.

    var
      instance : TMyClass;
    
    begin
      instance := TMyClass.Create;
      try
        DoSomething(instance);
      finally
        instance.Free;
      end;
    end;
    
    
    procedure DoSomething(AObject: TMyClass);
    begin
      // Check here
      DoSomethingElse(AObject);
      // Check here
    end;
    
    procedure DoSomethingElse(AObject: TMyClass);
    begin
      // Check here
    end;
    

    You can check the state of the object at each entry and exit point of each function so you find out when the change occurs. Post that code if you cannot find the problem yourself.

    Please note that using public fields can be dangerous, because anything can access and change that field.

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

Sidebar

Related Questions

Using Delphi 2010, let's say I've got a class declared like this: TMyList =
I'm trying to call Window's SendMessage method in Delphi Prism, I've declared the class
In delphi I can declare a type of class like so type TFooClass =
Delphi part: I have a class with the event and from that event I
How i can declare a global method in delphi prism using the __Global class?
In external (Delphi-created) DLL I've got the following function that I need to call
In Delphi, IUnknown is declared as: function QueryInterface(const IID: TGUID; out Obj): HResult; stdcall;
ShlObj.pas line 9922 (as in Delphi XE): type BFFCALLBACK = function(Wnd: HWND; uMsg: UINT;
I've been looking through the TDataset class and its string fields, in Delphi XE2
Why variables are declared as TStrings and created as TStringList ? eg: the var

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.