Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-12

TRadioGroup not found error

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Thomas Crone

My latest attempt to use Lazarus has given some odd errors…

First it complained about TEdit, so I replaced that with TMemo.

Now it is saying: Class “TRadioGroup” not found

Do I have to add something manually to the Uses statement?

I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64

Tom Crone <mailto:>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20181207/3b518d06/attachment.html>

Reply by email

Thomas Crone

My latest attempt to use Lazarus has given some odd errors…

First it complained about TEdit, so I replaced that with TMemo.

Now it is saying: Class “TRadioGroup” not found

Do I have to add something manually to the Uses statement?

I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64

Tom Crone <mailto:>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20181211/e45b786d/attachment.html>

Reply by email

Vojtěch Čihák

TRadioGroup is in unit ExtCtrls. Lazarus, however, adds it automatically to "uses" when you insert it to

Show quoted text 5 lines
Od: "Thomas Crone via lazarus" Komu: Datum: 11.12.2018 22:58 Předmět: [Lazarus] TRadioGroup not found error

My latest attempt to use Lazarus has given some odd errors…

First it complained about TEdit, so I replaced that with TMemo.

Now it is saying: Class “TRadioGroup” not found 

Do I have to add something manually to the Uses statement?

I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64

Tom Crone

----------

Reply by email

Thomas Crone
to Vojtěch Čihák

I had some of the TForm as private and some not.

When I took everything to of private, the error went away.

tom

Show quoted text 35 lines
On Dec 11, 2018, at 5:23 PM, Vojtěch Čihák via lazarus wrote: TRadioGroup is in unit ExtCtrls. Lazarus, however, adds it automatically to "uses" when you insert it to form at design-time. V. ______________________________________________________________ > Od: "Thomas Crone via lazarus" > Komu: > Datum: 11.12.2018 22:58 > Předmět: [Lazarus] TRadioGroup not found error > My latest attempt to use Lazarus has given some odd errors… First it complained about TEdit, so I replaced that with TMemo. Now it is saying: Class “TRadioGroup” not found Do I have to add something manually to the Uses statement? I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64 Tom Crone <mailto:> ---------- -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus> -- _______________________________________________ lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20181215/7a40ceb0/attachment.html>

Reply by email

Thomas Crone
to Thomas Crone

If this is not the right forum for this, Please tell me where I can post it.

I am getting the same type of message as I got a few weeks ago:

… '‘EClassNoFound’ with message:
Class ‘TButton’ not found
at address 10004A515

I have tried to move to Lazarus from Delphi 4 several times over the past 5 or 6 years, and always given up in frustration.

Errors seem to pop up, go away , and come back for no apparent reasons. (some of that, of course, could be windows problems…)

I’ve been programming since 1970, first in FORTRAN II, then Algol, Simula, snobol, icon, DEC10 assembly, various BASICs, Pascal (Turbo V2 thru Delphi, and on VAX VMS), etc. The most recent new language was python on the Raspberry Pi.

Before I retired a few years ago, I volunteered to help with the Lazarus documentation, when I couldn’t figure out how to move my collection of units (2D & 3d geometry, i/o routines, geographic projections & mapping, music synthesis, etc.) to Lazarus. In Delphi, I could just put the .dcu files in the Delphi /lib directory; for the programs I’m now working on, I had to include the entire source of my TIndexString unit in the program source.

maybe I should rewrite all my objects in python…

Tom Crone

Show quoted text 49 lines
Begin forwarded message: From: Thomas Crone Subject: Re: [Lazarus] TRadioGroup not found error Date: December 15, 2018 at 9:42:45 PM EST To: Lazarus mailing list I had some of the TForm as private and some not. When I took everything to of private, the error went away. tom > On Dec 11, 2018, at 5:23 PM, Vojtěch Čihák via lazarus < <mailto:>> wrote: > > TRadioGroup is in unit ExtCtrls. Lazarus, however, adds it automatically to "uses" when you insert it to form at design-time. > > V. > ______________________________________________________________ > > Od: "Thomas Crone via lazarus" < <mailto:>> > > Komu: <mailto:> > > Datum: 11.12.2018 22:58 > > Předmět: [Lazarus] TRadioGroup not found error > > > My latest attempt to use Lazarus has given some odd errors… > > First it complained about TEdit, so I replaced that with TMemo. > > Now it is saying: Class “TRadioGroup” not found > > Do I have to add something manually to the Uses statement? > > I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64 > > Tom Crone <mailto:> > > ---------- > > -- > _______________________________________________ > lazarus mailing list > <mailto:> > https://lists.lazarus-ide.org/listinfo/lazarus <https://lists.lazarus-ide.org/listinfo/lazarus> > -- > _______________________________________________ > lazarus mailing list > <mailto:> > https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20181231/505b5665/attachment.html>

Reply by email

Tony Whyman
to Thomas Crone

Tom,

I made transition from Delphi about 9 years ago and never looked back. Yes, there are some conceptual differences, especially in the way the IDE works and which you have to get your head around but, generally, the problems are to do with the occasional name change for library functions, or the need to include a different mix of units and these can usually be resolved quickly at compile time.

Looking at your comments, I am trying to work out where you are going wrong. Further down the EMail, you seem to be tripping over problems with which units to include. Expect this as a one-off cost of moving from Delphi to Lazarus. The easiest way of resolving the problem with LCL objects is to just drop another copy of the object on the form, save the form and then delete the new object. The effect is to add the missing unit to the uses clause.

EClassNotFound is an odd one. This is a run time error in the streaming system - which is very similar to Delphi's streaming system. It suggests that you have somehow managed to include a .lfm file that includes a reference to a TButton, while the corresponding .pas has lost the Form's reference to the button.

e.g. a line such as

FButton1: TButton;

is missing. I would search the .pas file for a match on "TButton".

This can be the result of a simple "fat finger" error deleting a line by mistake - I have done that myself, but normally this results in an error message that tells you that the form reference is missing. However, if this was the only reference and stdctrls is not otherwise linked in then perhaps the error you are seeing is the result.

Referring to your point about Delphi /lib, your problem here may be the difference between Delphi and Lazarus packages.

It's probably best to think of Lazarus packages as compile time conveniences rather than as code libraries that are nicely packaged together in a single file. When you create a GUI application in Lazarus, you automatically get the LCL package "added" to you project. Its compiled units path then gets included in the Project's compiler and linker search paths. The same thing happens when you include a component in a third party package. You can also explicitly add packages as "New Requirements".

To see this in action, in any GUI Lazarus project open the Project Options dialog, select "Compiler Options->Compilation and Linking" in the left hand pane and then click on the "Show Options button. You should then see the full list of options passed to the compiler including each package's units directory. This feature is your friend when you are trying to work out why a unit is "not found".

When you compile a project, any dependent packages should also get compiled if their source code has been modified since they were last compiled, their object code then gets linked into the program.

Your problem with your TIndexString unit may have a similar root.

When you add a unit to a project, if its path is not already in the project's search path, this should get added - and you can see the result with "Show Options". If the unit is not added or, in particular, when its search path is not included in the project's "Other Unit paths" then the compiler will not able to find it.

Hope the above helps - it really is worth making the effort to move to Lazarus.

Regards

Tony Whyman

MWA Software

Thomas Crone wrote 93 lines
If this is not the right forum for this,  Please tell me where I can post it. I am getting the same type of message as I got a few weeks ago:    … '‘EClassNoFound’  with message:    Class ‘TButton’ not found    at address 10004A515 I have tried to move to Lazarus from Delphi 4 several times over the past 5 or 6 years, and always given up in frustration. Errors seem to pop up, go away , and come back for no apparent reasons. (some of that, of course, could be windows problems…) I’ve been programming since 1970, first in FORTRAN II, then Algol, Simula, snobol, icon, DEC10 assembly, various BASICs, Pascal (Turbo V2 thru Delphi, and on VAX VMS), etc. The most recent new language was python on the Raspberry Pi. Before I retired a few years ago, I volunteered to help with the Lazarus documentation, when I couldn’t figure out how to move my collection of units (2D & 3d geometry, i/o routines, geographic projections & mapping, music synthesis, etc.) to Lazarus. In Delphi, I could just put the .dcu files in the Delphi /lib directory; for the programs I’m now working on, I had to include the entire source of my TIndexString unit in the program source. maybe I should rewrite all my objects in python… Tom Crone > Begin forwarded message: > > *From: *Thomas Crone < <mailto:>> > *Subject: **Re: [Lazarus] TRadioGroup not found error* > *Date: *December 15, 2018 at 9:42:45 PM EST > *To: *Lazarus mailing list < > <mailto:>> > > I had some of the TForm as private and some not. > > When I took everything to of private, the error went away. > > tom >> On Dec 11, 2018, at 5:23 PM, Vojtěch Čihák via lazarus >> < >> <mailto:>> wrote: >> >> TRadioGroup is in unit ExtCtrls. Lazarus, however, adds it >> automatically to "uses" when you insert it to form at design-time. >> >> V. >> ______________________________________________________________ >> > Od: "Thomas Crone via lazarus" < >> <mailto:>> >> > Komu: >> <mailto:> >> > Datum: 11.12.2018 22:58 >> > Předmět: [Lazarus] TRadioGroup not found error >> > >> My latest attempt to use Lazarus has given some odd errors… >> >> First it complained about TEdit, so I replaced that with TMemo. >> >> Now it is saying: Class “TRadioGroup” not found >> >> Do I have to add something manually to the Uses statement? >> >> I’m on Win 7 pro 64bit with Lazarus 1.8.4, 2018-05-19, FPC Ver >> 3.0.4, SVN Rev. 57972, x86_64 - win64 - win32/win64 >> >> Tom <mailto:> >> >> ---------- >> >> -- >> _______________________________________________ >> lazarus mailing list >> <mailto:> >> https://lists.lazarus-ide.org/listinfo/lazarus >> -- >> _______________________________________________ >> lazarus mailing list >> <mailto:> >> https://lists.lazarus-ide.org/listinfo/lazarus >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190101/f6056def/attachment-0001.html>

Reply by email

Alexey
to Tony Whyman

To use your units in Lazarus, make a new package, then copy all units to a single subdir (with the Lpk package), then add all pas units to this package. So user needs to install this package. So all pas files will be auto found by program if program uses this package. AT

Reply by email

Juha Manninen
to Thomas Crone: If this is not the right forum for this, Please tell me where I can post it. I am…
AM Thomas Crone wrote
Errors seem to pop up, go away , and come back for no apparent reasons. (some of that, of course, could be windows problems…)

It can also be that your Lazarus installation is screwed by some old leftover installations.
Please remove all such directories and especially compiled units. Remove user configuration, too.
Then install a new version. I recommend the latest 2.0RC3.

Juha

Reply by email