Recent

Author Topic: [SOLVED] FCL missing from project  (Read 2407 times)

iru

  • Sr. Member
  • ****
  • Posts: 331
[SOLVED] FCL missing from project
« on: November 09, 2015, 10:28:33 pm »
Gentlefolk,

Environment: LAZ 1.4, Lunux Mint 17.

I have a new project with a modal unit/form. The variable "ModalResult" is undefined in the modal form.

The code appears to be the same as a similar unit/form in another project which compiles clean with no error.

The only difference I can see between the two projects is that the one with the undefined "ModalResult" has no "FCL" in the "required" section of the project inspector.

Am I going in the correct direction? How do I add the FCL to the project?

Any help appreciated, Ian.   
« Last Edit: November 09, 2015, 11:47:47 pm by iru »

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: FCL missing from project
« Reply #1 on: November 09, 2015, 10:43:31 pm »
The variable "ModalResult" is undefined in the modal form.

Not so. ModalResult is already declared as a public property of TCustomForm in the Lazarus sources, so is present in every form/dialog/window you use in Lazarus.
Or have you tried to redefine it?

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: FCL missing from project
« Reply #2 on: November 09, 2015, 11:13:29 pm »
Thanks for the response.

I have simply tried to use "ModalResult := mrOK".
The compiler complains that it is unknown.

Without the "ModalResult" the unit/form compiles clean. The code in the module looks the same as a similar form in another project which compiles clean with "ModalResult := mrOK" included.

That is why I was looking at something missing/bad in the project environment.

So where do I look???

Thanks again, Ian

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: [SOLVED] FCL missing from project
« Reply #3 on: November 09, 2015, 11:52:22 pm »
Gentlefolk,

The problem is where I was using the ModalResult.

The form uses a second thread to check the state of a remote server. The "ModalResult" was in a routine "TMyThread.ShowStatus" rather than the main thread code.

Ian.

 

TinyPortal © 2005-2018