Recent

Author Topic: [SOLVED] Cannot open .pas file  (Read 1331 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1800
[SOLVED] Cannot open .pas file
« on: June 05, 2025, 08:14:54 am »
I have made a web application. I installed Lazarus 4.0, and tried to open the old CGI web server program. It's fine, and I can compile it without errors.
But I cannot open one of the web module .pas file. When I try to open the .pas file, .lfm file is open. I cannot convert to the form (datamodule form).
In the past, I had no problem. I changed the layout to "New" docked design.


Windows Server 2019.
« Last Edit: June 11, 2025, 07:48:51 am by egsuh »

Joanna

  • Hero Member
  • *****
  • Posts: 1461
Re: Cannot open .pas file
« Reply #1 on: June 09, 2025, 03:23:56 pm »
It’s a shame that nobody seems to know the answer. Were you able to find answer?

Thaddy

  • Hero Member
  • *****
  • Posts: 19273
  • Glad to be alive.
Re: Cannot open .pas file
« Reply #2 on: June 09, 2025, 04:22:14 pm »
Did you write the web application using Lazarus components? (The wrong way) or did you write it in pure FPC? (The right way)
Using the FPC cgi examples do not have a problem.
I just tested that with an old cgi project from 10 years ago: NO Laz components , plain object oriented  fpc.
« Last Edit: June 09, 2025, 04:46:37 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

egsuh

  • Hero Member
  • *****
  • Posts: 1800
Re: Cannot open .pas file
« Reply #3 on: June 11, 2025, 05:51:45 am »
Quote
Were you able to find answer?

No.  Not yet.

Quote
Did you write the web application using Lazarus components? (The wrong way) or did you write it in pure FPC? (The right way)

I write using Lazarus components. I do not know how to write programs in pure FPC.

I haven't any problem with the same project for long years --- possibly longer than 10 years. It matters only with Lazarus 4.0, and with Windows Server 2019, and WebModule only --- simple Datamodule components are fine.

Joanna

  • Hero Member
  • *****
  • Posts: 1461
Re: Cannot open .pas file
« Reply #4 on: June 11, 2025, 06:44:09 am »
I wish I could be more helpful
Maybe you can make an experimental unit with the same components as your web module and create them in the initialization section.
The data module really is just a form that is never visible at runtime. The componets you need can be in a plain unit without an lfm file.

cdbc

  • Hero Member
  • *****
  • Posts: 2818
    • http://www.cdbc.dk
Re: Cannot open .pas file
« Reply #5 on: June 11, 2025, 07:43:18 am »
Hi
Zip the 2 offending files, upload the zip here and let us have a 'LookSee'  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

egsuh

  • Hero Member
  • *****
  • Posts: 1800
Re: Cannot open .pas file
« Reply #6 on: June 11, 2025, 07:48:33 am »
Ha... ha....

weblaz was not installed !   Installing that package solved the problem.

Joanna, thanks a lot for your comment --- gave me some idea. 

Joanna

  • Hero Member
  • *****
  • Posts: 1461
Re: [SOLVED] Cannot open .pas file
« Reply #7 on: June 11, 2025, 10:22:24 am »
Glad I could help just from talking a bit.  :)
It is kind of strange how programs with missing packages can still compile. It just happened to me...

 

TinyPortal © 2005-2018