Recent

Author Topic: Edit1.Text = Type TEDIT has no component named TEXT  (Read 697 times)

AllanMello

  • Newbie
  • Posts: 1
Edit1.Text = Type TEDIT has no component named TEXT
« on: May 04, 2022, 02:19:26 pm »
Lazarus 2.0.6 dfsg-3 Linux

Edit1.Text = Type TEDIT has no component named TEXT
published property TEdit.Text:TCaption

How to solve this problem?

Zoran

  • Hero Member
  • *****
  • Posts: 1739
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #1 on: May 04, 2022, 02:34:27 pm »
Lazarus 2.0.6 dfsg-3 Linux

Edit1.Text = Type TEDIT has no component named TEXT
published property TEdit.Text:TCaption

How to solve this problem?

With this explanation of your problem, I doubt anyone can easily understand what is happening to you. TEdit certainly has the property (not component???) named Text.

This might help:
Upload here the simple project which demonstrates this problem (zipped without binaries, read this first please).

Handoko

  • Hero Member
  • *****
  • Posts: 4679
  • My goal: build my own game engine using Lazarus
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #2 on: May 04, 2022, 04:34:32 pm »
Yep, show us the code.

Or, start a new project, drop a TEdit on the form and put this code in the Form's OnCreate event:
Code: Pascal  [Select][+][-]
  1.   Edit1.Text := 'Hello!';

If you still get the same error, I think you may need to reinstall your Lazarus.

Zvoni

  • Hero Member
  • *****
  • Posts: 1261
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #3 on: May 05, 2022, 08:29:37 am »
If you still get the same error, I think you may need to reinstall your Lazarus.
Which he might need to do anyway.
i see a "dfsg" in his Lazarus-Description, which is probably from Debian/Ubuntu-Repository.
Read the "How to install on Linux" Sub-Forum
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

rvk

  • Hero Member
  • *****
  • Posts: 4807
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #4 on: May 05, 2022, 09:27:36 am »
Lazarus 2.0.6 dfsg-3 Linux
Edit1.Text = Type TEDIT has no component named TEXT
published property TEdit.Text:TCaption
With this explanation of your problem, I doubt anyone can easily understand what is happening to you. TEdit certainly has the property (not component???) named Text.
This might even be a real message (even though it says "component named TEXT").

See a similar topic here with screenshot.
https://www.lazarusforum.de/viewtopic.php?t=6019
and https://www.pilotlogic.com/sitejoom/index.php/forum/debug/4867-trying-to-inspect-string-lists-little-luck

This is probably an inspection, watch or debug window (hovering over Edit1.Text) where Edit1.Text isn't accessible because it's not a field but has a Getter/Setter.
So not a real error message which prevents the program from running.

(See also https://www.mail-archive.com/lazarus@lists.lazarus-ide.org/msg09668.html)

Handoko

  • Hero Member
  • *****
  • Posts: 4679
  • My goal: build my own game engine using Lazarus
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #5 on: May 09, 2022, 05:32:47 am »
This is probably an inspection, watch or debug window (hovering over Edit1.Text) where Edit1.Text isn't accessible because it's not a field but has a Getter/Setter.

Now, I remember that. Thanks rvk.

I had that problem too. My solution is simple, use a variable for getting the value of that property so we can debug and hovering the mouse pointer on that variable.

Code: Pascal  [Select][+][-]
  1.   Test := Edit1.Text;

jcmontherock

  • Full Member
  • ***
  • Posts: 136
Re: Edit1.Text = Type TEDIT has no component named TEXT
« Reply #6 on: May 09, 2022, 11:13:04 am »
We are doing all the same... :D :D

 

TinyPortal © 2005-2018