Recent

Author Topic: Packages  (Read 1974 times)

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Packages
« on: April 04, 2019, 09:32:02 pm »
I downloaded a zip file from code call on TListView.

When I unzip it I get the following 11 files.I can't load it think it was a package.

Customer.pas
Form_Customer.dfm
Form_Customer.pas
WorkingWithTListView.cfg
WorkingWithTListView.dof
WorkingWithTListView.dpr
WorkingWithTListView.exe
WorkingWithTListView.res
WorkingWithTListView_MainForm.ddp
WorkingWithTListView_MainForm.dfm
WorkingWithTListView_MainForm.pas

It occurs to me this is probably Delphi so without Dephi I can't use it.

Is there an example of a Free Pascal Tlistview somewhere. I looked in the FPC\examples and there isn't much.




FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

wp

  • Hero Member
  • *****
  • Posts: 13556
Re: Packages
« Reply #1 on: April 04, 2019, 09:51:03 pm »
Is there an example of a Free Pascal Tlistview somewhere.
Did you read their tutorial (http://forum.codecall.net/topic/74040-basic-working-with-tlistview/)? It looks quite competent.

BTW, why do you call this post "Packages"?
« Last Edit: April 04, 2019, 09:58:16 pm by wp »

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Packages
« Reply #2 on: April 04, 2019, 10:02:55 pm »
Well I thought I was dealing with a Laz package when I started the post. And I didn't go back and change it.

Half way thru I realized it was a Delphi of some kind or something. I have found under Tools Delphi Conversions and converted somethink I think the unit. It loaded into Laz but gets a compiler error I can't understand.

Poor excuse but I'm sticking with it.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Packages
« Reply #3 on: April 04, 2019, 10:05:24 pm »
Is there an example of a Free Pascal Tlistview somewhere.
Did you read their tutorial (http://forum.codecall.net/topic/74040-basic-working-with-tlistview/)? It looks quite competent.

BTW, why do you call this post "Packages"?

Yes I did. I followed it along as far as I could but was hoping for something more.
That where I got the Delphi example I can't get to compile.
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

wp

  • Hero Member
  • *****
  • Posts: 13556
Re: Packages
« Reply #4 on: April 04, 2019, 10:29:56 pm »
Here it is in the attachment.

But you should try to learn how to convert Delphi projects by yourself: either use the converter which comes with Lazarus ("Tools" > "Delphi conversion" > "Convert Delphi project to Lazarus project") or do it manually:
  • Make a backup copy of the original Delphi project. You may need it again when you damage something...
  • Rename the .dpr file to .lpr. Open it in an external editor and add "Interfaces" as the first unit.
  • Rename .dfm files to .lfm
  • Open the pas files which have an .dfm/lfm counterpart and change the directive {$R *.dfm} to {$R *.lfm}
  • Load the project into Lazarus. Since we don't have an .lpi file Lazarus creates a new project. You must add the required units manually to the project. Main form first!
  • Try to compile. Some language constructs require to add {$mode delphi} to the top of units which do not compile.
  • When something does not compile comment the procedure and continue without it. There's a good change that at least something is working without it. When you got a compiling program you still can look for the commented parts later.
  • When you want to use the program under Linux etc you must replace the Windows units by the Lazarus interface units, i.e. Windows, Messages --> LCLIntf, LCLType, LProc, LMessages

JLWest

  • Hero Member
  • *****
  • Posts: 1293
Re: Packages
« Reply #5 on: April 05, 2019, 10:41:07 am »
I have it running and it's only 1:pm in my part of the world. But there is more. I believe you gave me a demo called ATPViewer which I couldn't understand very well at the time. I was able to dissemble ATPViewer, change it a bit and have it load the file.

It's in vReport mode and and something about data load. I don't fully understand how this thing works but what I have coded works.

 
FPC 3.2.0, Lazarus IDE v2.0.4
 Windows 10 Pro 32-GB
 Intel i7 770K CPU 4.2GHz 32702MB Ram
GeForce GTX 1080 Graphics - 8 Gig
4.1 TB

 

TinyPortal © 2005-2018