Sign in Join

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

Mailing lists / lazarus / 2010-10

TListView compatibility Delphi <=> Lazarus?

33 messages · 18 people · –

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

I have tried to port our Delphi7 descendant of TListView to Lazarus but it seems like the Lazarus implementation lacks a number of properties that are present in Delphi.
Just as an example: There is no Gridlines property available.

Is there a more complete implementation available anywhere?

I am running Lazarus 0.9.28.2 and FPC 2.2.4 on WindowsXP off of the recommended and installed 2 weeks
ago.

I also noted via Google that there was some discussion on implementation incompleteness of TListView back in Jan 2008, so surely this should have been fixed by now?

Bo Berglund Developer in Sweden

Reply by email

Vincent Snijders
to Bo Berglund

2010/10/12 Bo Berglund :

I also noted via Google that there was some discussion on implementation incompleteness of TListView back in Jan 2008, so surely this should have been fixed by now?

Not surely, some feature request, even if reported in the bug tracker, remain open for years, until somebody provides a patch.

So a mere discussion in Jan 2008, not even two years ago and only 10 months before the release you are using, is surely no reason why it should have been fixed by now.

Vincent

Reply by email

Bo Berglund
to Vincent Snijders
Vincent Snijders wrote 11 lines
2010/10/12 Bo Berglund : > I also noted via Google that there was some discussion on > implementation incompleteness of TListView back in Jan 2008, so surely > this should have been fixed by now? Not surely, some feature request, even if reported in the bug tracker, remain open for years, until somebody provides a patch. So a mere discussion in Jan 2008, not even two years ago and only 10 months before the release you are using, is surely no reason why it should have been fixed by now.

Interesting, why is the release I am using so old when it is the latest available on the download page at SF (for Windows)? But the SF page lists the version as dated 2009-10-26, not 2008-10-xx as you suggest. Still about a year old.

I asked about the installation files for Windows in a previous thread but the responses were directed towards building myself and it looks like a very hard undertaking, especially on Windows. The pages referenced discuss how to get sources, setting up compiler options and what have you to build a version of fpc/laz, not exactly what a newbie needs concerning the development IDE. :-(

Too bad....

Bo Berglund

Reply by email

Vincent Snijders
to Bo Berglund

2010/10/12 Bo Berglund :

Show quoted text 9 lines
>So a mere discussion in Jan 2008, not even two years ago and only 10 >months before the release you are using, is surely no reason why it >should have been fixed by now. Interesting, why is the release I am using so old when it is the latest available on the download page at SF (for Windows)? But the SF page lists the version as dated 2009-10-26, not 2008-10-xx as you suggest. Still about a year old.

Sorry, I miscalculated a year, and counted since January 2009.

Vincent

Reply by email

Vincent Snijders
to Bo Berglund: On Tue, 12 Oct 2010 07:56:35 +0200, Vincent Snijders Interesting, why is the release I am…

2010/10/12 Bo Berglund :

Show quoted text 7 lines
I asked about the installation files for Windows in a previous thread but the responses were directed towards building myself and it looks like a very hard undertaking, especially on Windows. The pages referenced discuss how to get sources, setting up compiler options and what have you to build a version of fpc/laz, not exactly what a newbie needs concerning the development IDE. :-(

The easiest way to get an up to date Lazarus is from snapshot. They have one major drawback, they are untested builds that come as they come. The build of the last three days had a bug that the compiler options were not saved, for example. Such issues happen once a month or so, but they do happen.

Vincent

Reply by email

Benito van der Zander
to Bo Berglund: I have tried to port our Delphi7 descendant of TListView to Lazarus but it seems like the…

Hi,

Show quoted text 6 lines
I have tried to port our Delphi7 descendant of TListView to Lazarus but it seems like the Lazarus implementation lacks a number of properties that are present in Delphi. Just as an example: There is no Gridlines property available. Is there a more complete implementation available anywhere?

I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches
it finally worked -- until I tried it on another operating system where it completely failed...
So I threw everything away and wrote my own list view that is independent of the LCL
and the OS, and you should do the same, at least/especially if you want platform
independence (or use my
http://benibela.de/components_en.html#treelistview, or the virtual tree list view).

Benito van der Zander

Reply by email

zeljko
to Benito van der Zander
Benito van der Zander wrote 20 lines
Hi, > I have tried to port our Delphi7 descendant of TListView to Lazarus > but it seems like the Lazarus implementation lacks a number of > properties that are present in Delphi. > Just as an example: There is no Gridlines property available. > > Is there a more complete implementation available anywhere? I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches it finally worked -- until I tried it on another operating system where it completely failed... So I threw everything away and wrote my own list view that is independent of the LCL and the OS, and you should do the same, at least/especially if you want platform independence (or use my http://benibela.de/components_en.html#treelistview, or the virtual tree list view).

One small suggestion: Debian is not an OS.Change it to Linux / gtk2 :)

zeljko

Reply by email

Felipe Monteiro de Carvalho
to Benito van der Zander: I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches…

Yes, Lazarus uses the native controls of each platform, so that many features shouldn't be added if they have no hope of working everywhere.

Creating a custom-drawn version of the control is the correct solution and there is now lazarus/components/customdraw which is a good place to add very often used custom-drawn versions of the standard components.

Felipe Monteiro de Carvalho

Reply by email

Marcos Douglas
to Benito van der Zander: I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches…
Benito van der Zander wrote 20 lines
Hi, > > I have tried to port our Delphi7 descendant of TListView to Lazarus > but it seems like the Lazarus implementation lacks a number of > properties that are present in Delphi. > Just as an example: There is no Gridlines property available. > > Is there a more complete implementation available anywhere? I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches it finally worked -- until I tried it on another operating system where it completely failed... So I threw everything away and wrote my own list view that is independent of the LCL and the OS, and you should do the same, at least/especially if you want platform independence (or use my http://benibela.de/components_en.html#treelistview, or the virtual tree list view).

Did you show your code to the Lazarus team? If your code works in all OS, but TListView (LCL) not works, you can contribute a lot.

Marcos Douglas

Reply by email

Reimar Grabowski
to Bo Berglund: On Tue, 12 Oct 2010 07:56:35 +0200, Vincent Snijders Interesting, why is the release I am…
Show quoted text 6 lines
I asked about the installation files for Windows in a previous thread but the responses were directed towards building myself and it looks like a very hard undertaking, especially on Windows. The pages referenced discuss how to get sources, setting up compiler options and what have you to build a version of fpc/laz, not exactly what a newbie needs concerning the development IDE. :-(

Installation and compilation from sources is very easy on Linux (I gave instructions in another thread). You don't have to do it but the svn version is always the 'latest and greatest(tm)' (minus the occasional bugs crawling in but you have svn so no problem with that). I don't know about Win but it can't be that hard (perhaps for Joe User but you are a developer after all). I assume you talk about this page: http://wiki.lazarus.freepascal.org/Getting_Lazarus. Please provide detailed feedback where you had problems and what is not explained good enough so that the documentation can be improved.

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Benito van der Zander
to Marcos Douglas: On Tue, Oct 12, 2010 at 12:49 PM, Benito van der Zander Did you show your code to the…
Did you show your code to the Lazarus team? If your code works in all OS, but TListView (LCL) not works, you can contribute a lot.

Well, I wrote a link in the Lazarus wiki, no idea if they found it there. And I don't want anonymous
people to secretly use my source, so it is licensed under the GPL and incompatible to Lazarus' mLGPL.

But it is just another paradigm to make the control completely custom drawn (like the LCL TTreeView which
seems to work fine) and therefore the implementation is completely incompatible to the current TListView.

Benito

Reply by email

Justin Smyth

sent from my Telstra NEXTG? handset

Earlier message 21 lines
-----Original Message----- From: Vincent Snijders Sent: Tuesday, 12 October 2010 4:56 PM To: ; Lazarus mailing list Subject: Re: [Lazarus] TListView compatibility Delphi <=> Lazarus? 2010/10/12 Bo Berglund : > I also noted via Google that there was some discussion on > implementation incompleteness of TListView back in Jan 2008, so surely > this should have been fixed by now? Not surely, some feature request, even if reported in the bug tracker, remain open for years, until somebody provides a patch. So a mere discussion in Jan 2008, not even two years ago and only 10 months before the release you are using, is surely no reason why it should have been fixed by now. Vincent --

Reply by email

Bo Berglund
to Reimar Grabowski: On Tue, 12 Oct 2010 08:54:59 +0200 Installation and compilation from sources is very easy…
Reimar Grabowski wrote 19 lines
On Tue, 12 Oct 2010 08:54:59 +0200 Bo Berglund wrote: > I asked about the installation files for Windows in a previous thread > but the responses were directed towards building myself and it looks > like a very hard undertaking, especially on Windows. The pages > referenced discuss how to get sources, setting up compiler options and > what have you to build a version of fpc/laz, not exactly what a newbie > needs concerning the development IDE. :-( Installation and compilation from sources is very easy on Linux (I gave instructions in another thread). You don't have to do it but the svn version is always the 'latest and greatest(tm)' (minus the occasional bugs crawling in but you have svn so no problem with that). I don't know about Win but it can't be that hard (perhaps for Joe User but you are a developer after all). I assume you talk about this page: http://wiki.lazarus.freepascal.org/Getting_Lazarus. Please provide detailed feedback where you had problems and what is not explained good enough so that the documentation can be improved.

I read it and there is no need for any special things on Ubuntu since as far as I can see I get the latest by sudo apt-get install lazarus.

My problem is *Windows* and here the page clearly states: "Specific for platform
Get Lazarus for Windows - use the Sourceforge link above."

And that is where the year old version resides.... That's as detailed I can get concerning that page.

Then there is also:
http://devblog.brahmancreations.com/content/build-scripts-for-installing-freepascal-and-lazarus-from-source which seems totally devoted to Linux...

Based on that a contributor posted this here:
http:/msg13071.html
but even though it is a batch script for Windows it is hard to follow and it looks like one has to know beforehand which version is to be handled (by number rather than saying TRUNK).

Even though I am a developer snce many years I have never before run into compiling my actual dev tools like the compiler and IDE...

Bo Berglund

Reply by email

Bo Berglund
to Benito van der Zander: I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches…
Benito van der Zander wrote 18 lines
Hi, > I have tried to port our Delphi7 descendant of TListView to Lazarus > but it seems like the Lazarus implementation lacks a number of > properties that are present in Delphi. > Just as an example: There is no Gridlines property available. > > Is there a more complete implementation available anywhere? I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches it finally worked -- until I tried it on another operating system where it completely failed... So I threw everything away and wrote my own list view that is independent of the LCL and the OS, and you should do the same, at least/especially if you want platform independence (or use my http://benibela.de/components_en.html#treelistview, or the virtual tree list view).

I'd probably go that way too concerning the visuals of the new program, especially since I see that the treelistview can be used also in Delphi, so I get the possibility to compile there too.

Bo Berglund

Reply by email

waldo kitty
to Bo Berglund: On Tue, 12 Oct 2010 21:12:15 +0200, Reimar Grabowski I read it and there is no need for…
Bo Berglund wrote 14 lines
On Tue, 12 Oct 2010 21:12:15 +0200, Reimar Grabowski wrote: > Installation and compilation from sources is very easy on Linux (I gave > instructions in another thread). You don't have to do it but the svn > version is always the 'latest and greatest(tm)' (minus the occasional > bugs crawling in but you have svn so no problem with that). > I don't know about Win but it can't be that hard (perhaps for Joe User > but you are a developer after all). I assume you talk about this page: > http://wiki.lazarus.freepascal.org/Getting_Lazarus. > Please provide detailed feedback where you had problems and what is not > explained good enough so that the documentation can be improved. I read it and there is no need for any special things on Ubuntu since as far as I can see I get the latest by sudo apt-get install lazarus.

slight correction here... "the latest" is not *the* latest... it is "the latest official package"... *the* latest comes directly from SVN and must be compiled first... it brings features, bug fixes and possibly some bugs...

Show quoted text 6 lines
My problem is *Windows* and here the page clearly states: "Specific for platform Get Lazarus for Windows - use the Sourceforge link above." And that is where the year old version resides.... That's as detailed I can get concerning that page.

just like the above... that is the latest official public release...

Reply by email

Graeme Geldenhuys
to Benito van der Zander: I tried to use the TListView in Lazarus in 2008/9 and after writing a lot of LCL patches…

Op 2010-10-12 17:49, Benito van der Zander het geskryf:

So I threw everything away and wrote my own list view that is independent of the LCL and the OS, and you should do the same, at least/especially if you want platform independence

Or save yourself 3-4 years of work, and use fpGUI Toolkit instead of the LCL. What you describe is exactly what I did with fpGUI. All custom drawn components, all work identical on each platform (true write once, compile everywhere), much lower library dependencies (makes deployment very easy). You can also customize the look of any component with little fuss.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/

Reply by email

Martin Schreiber
to Graeme Geldenhuys
Graeme Geldenhuys wrote 8 lines
Op 2010-10-12 17:49, Benito van der Zander het geskryf: > So I threw everything away and wrote my own list view that is > independent of the LCL > and the OS, and you should do the same, at least/especially if you want > platform independence Or save yourself 3-4 years of work, and use fpGUI Toolkit instead of the LCL.

Or save yourself even 9..11 years of work and use MSEide+MSEgui. ;-)

Martin

Reply by email

Reimar Grabowski
to Martin Schreiber
Graeme Geldenhuys wrote:

<snip>

> Or save yourself 3-4 years of work, and use fpGUI Toolkit instead of the > LCL. Or save yourself even 9..11 years of work and use MSEide+MSEgui. ;-)

Hehe, good one. :)

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Reimar Grabowski
to Bo Berglund: On Tue, 12 Oct 2010 21:12:15 +0200, Reimar Grabowski I read it and there is no need for…
Even though I am a developer snce many years I have never before run into compiling my actual dev tools like the compiler and IDE...

Sorry for failing to understand but what is the difference between compiling dev tools and any other piece of software? Please explain.

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Bo Berglund
to Reimar Grabowski
Reimar Grabowski wrote 7 lines
On Tue, 12 Oct 2010 23:17:49 +0200 Bo Berglund wrote: > Even though I am a developer snce many years I have never before run > into compiling my actual dev tools like the compiler and IDE... Sorry for failing to understand but what is the difference between compiling dev tools and any other piece of software? Please explain.

Very simple:
You write your own code and you know exactly what it does and where it is located and whet tool you use to compile it (usually you click a compile button in the IDE).

With example programs you download from the web you normally get a folder full of files that also has among them a project file which you open in the IDE and again you compile with the compile button.

But the pages I have visited decribing how the compilation of Lazarus is done has masses of commands of various kinds including discussions on what compiler options are best to use etc etc etc.

A very long shot from loading up your project in the IDE and hitting the compile button.

Or is it possible to load the FPC compiler project into Lazarus and build it from there???

I do not know how to design and build a car but I can drive one and likewise I don't know how to design and build an airplane but I can fly one (yes I have a license).

This is basically the same concerning compilers and the development IDE, those are tools to get your own software working....

Bo Berglund Developer in Sweden

Reply by email

Graeme Geldenhuys
to Bo Berglund
Bo Berglund wrote
You write your own code and you know exactly what it does and where it is located and whet tool you use to compile it (usually you click a compile button in the IDE).

I understand where you are coming from. I had this same fear when I moved from Delphi 7 and Kylix 3 to FPC and Lazarus. But in the end there wasn't much to fear. You don't need to know the internals of the compiler or the internals of the IDE, to simply compile them.

With FPC, it is always easiest to simply download a pre-built nightly build, or the latest binary release. That's your starting point. Lazarus is buggy no matter which version you take, but normally it is best to start with the latest SVN version until you find a stable revision you can stay with for a while longer.

To compile lazarus IDE for the first time, it's simply a matter of running: make bigide
inside the lazarus folder.

After that, once you have a working lazarus binary things get easier... you can recompile the IDE from inside the IDE using the "Tools > Build IDE..." menu options.

Learning to compile projects from the command line is not hard, and it's actually very handy when you need to build a whole lot of projects etc, because you can script them. Lazarus IDE doesn't have "project groups" support like Delphi or Kylix has, so your only option is to open,compile,close lots of projects - boring! :)

The FPC compiler has lots of parameters, but you only need to learn 3-4 parameters to do most compilations. You can even setup units paths in your fpc.cfg file, which will reduce the amount of parameters you need for any project too, making things even easier.

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net:8080/fpgui/

Reply by email

Mattias Gaertner
to Bo Berglund: On Wed, 13 Oct 2010 18:38:54 +0200, Reimar Grabowski Very simple: You write your own code…
Show quoted text 12 lines
On Wed, 13 Oct 2010 18:38:54 +0200, Reimar Grabowski wrote: [...] But the pages I have visited decribing how the compilation of Lazarus is done has masses of commands of various kinds including discussions on what compiler options are best to use etc etc etc. A very long shot from loading up your project in the IDE and hitting the compile button. Or is it possible to load the FPC compiler project into Lazarus and build it from there???

Yes.
And no: you also need some RTL units and there is no lazarus package for them.

[...]

Mattias

Reply by email

Reimar Grabowski
to Bo Berglund: On Wed, 13 Oct 2010 18:38:54 +0200, Reimar Grabowski Very simple: You write your own code…
Very simple: You write your own code and you know exactly what it does and where it is located and whet tool you use to compile it (usually you click a compile button in the IDE).

Working on bigger projects/in a bigger team/with a special build system these assumptions are not always true. At least you know what tool to use to compile FPC. ;)

<snip>

Show quoted text 6 lines
I do not know how to design and build a car but I can drive one and likewise I don't know how to design and build an airplane but I can fly one (yes I have a license). This is basically the same concerning compilers and the development IDE, those are tools to get your own software working....

Nope, they are tools to get any software (in the supported language with available source code) working (yours, mine or other peoples) and are software themself so your comparison is flawed. I don't know anything about QT-Creator but I can compile it, I know nothing about OpenOffice but I can compile it, etc. For me the only difference between compiling my own programs and other peoples programs is reading a little documentation or asking a question on a mailing list. Actually it is even easier to compile Lazarus and FPC than your own programs because you are not responsible for the bugs and don't have to hunt them yourself. :) But if you don't feel comfortable building the IDE and FPC don't do it, binaries are available. I just think that having the source and therefor the option to compile them myself is a great feature of both projects (or open source in general) which developers should be informed about early on as it helps in the long run. It is not as complicated as you seem to think.

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Hans-Peter Diettrich
to Bo Berglund: On Wed, 13 Oct 2010 18:38:54 +0200, Reimar Grabowski Very simple: You write your own code…
Or is it possible to load the FPC compiler project into Lazarus and build it from there???

Not really. There exist some Lazarus projects (pp*.lpi), but these exist primarily for debugging the compiler. You have to select the project for the desired target CPU, and to specify the desired target OS. Installing an new compiler requires more steps, i.e. compiler bootstrap and RTL rebuild.

In the compiler bootstrap the new compiler is compiled by the old compiler. Then the new compiler is recompiled repeatedly by itself, until the resulting executables are binary identical.

There exist two Makefiles, in the FPC and FPC/compiler folders. The global one bootstraps the compiler for the current architecture, then rebuilds the RTL (typical usage: make clean all). When everything is okay, "make install --INSTALL_PREFIX <where>" will install (copy) the new compiler and RTL into the given directory; from memory, please lookup the correct invocation. The compiler/Makefile builds cross compilers for all targets (typical usage: make fullcycle).

DoDi

Reply by email

Juha Manninen gmail
to Bo Berglund: On Wed, 13 Oct 2010 18:38:54 +0200, Reimar Grabowski Very simple: You write your own code…
Bo Berglund wrote
But the pages I have visited decribing how the compilation of Lazarus is done has masses of commands of various kinds including discussions on what compiler options are best to use etc etc etc.

Yes, the instructions on wiki pages and elsewhere are messy. I tried to improve it but it was half-baked, too. It really should be improved, and a real "click one button" GUI installation program is needed.

Anyway, actually building Lazarus is easy :

1. Install FPC 2.4.x from SourceForge. I guess you have done it already. No need to build FPC.

2. Get Lazarus trunk using cmd line svn or TortoiseSVN. You have done that, too, already.

3. "make bigide".

The numerous scripts + a messy wiki page have just confused you instead of helping. I know the feeling from my own installation experiments.

Juha

Reply by email

Bo Berglund
to Juha Manninen gmail
Show quoted text 22 lines
On Wednesday 13 October 2010 23:22:48 Bo Berglund wrote: > But the pages I have visited decribing how the compilation of Lazarus > is done has masses of commands of various kinds including discussions > on what compiler options are best to use etc etc etc. Yes, the instructions on wiki pages and elsewhere are messy. I tried to improve it but it was half-baked, too. It really should be improved, and a real "click one button" GUI installation program is needed. Anyway, actually building Lazarus is easy : 1. Install FPC 2.4.x from SourceForge. I guess you have done it already. No need to build FPC. 2. Get Lazarus trunk using cmd line svn or TortoiseSVN. You have done that, too, already. 3. "make bigide". The numerous scripts + a messy wiki page have just confused you instead of helping. I know the feeling from my own installation experiments.

Thanks,
I got fpc-2.4.0.i386-win32 released in Dec 2009 from SF. I also got the combined lazarus-0.9.28.2-fpc-2.2.4-win32 with an earlier release.
Both are binary installers.

If I run the FPC installer I will get 2.4.0 and if I then run the Lazarus installer it may or may not install FPC 2.2.4. I hope it will detect the existing 2.4.0 fpc and *not* use the 2.2.4 version it is bundled with. But is this the case?

Or does the lazarus installer not check that there is already a newer FPC on the system and skip the fpc 2.2.4 installation? In that case ther will be two different FPC versions installed; so which will be used by any compile command issued?

Unfortunately our firewall does not let svn calls through so I can't use the svn sources at work...

Bo Berglund

Reply by email

Vincent Snijders
to Bo Berglund

2010/10/14 Bo Berglund :

Show quoted text 10 lines
I got fpc-2.4.0.i386-win32 released in Dec 2009 from SF. I also got the combined lazarus-0.9.28.2-fpc-2.2.4-win32 with an earlier release. Both are binary installers. If I run the FPC installer I will get 2.4.0 and if I then run the Lazarus installer it may or may not install FPC 2.2.4. I hope it will detect the existing 2.4.0 fpc and *not* use the 2.2.4 version it is bundled with. But is this the case?

No, it does not detect it, not does it use it. It also does not interfere with it.

Show quoted text 5 lines
Or does the lazarus installer not check that there is already a newer FPC on the system and skip the fpc 2.2.4 installation? In that case ther will be two different FPC versions installed; so which will be used by any compile command issued?

The included fpc 2.2.4 installation is more or less private to the Lazarus installation.

If you compile in Lazarus, the fpc compiler which is in the set in the environment options is used.
If you compile from the command line, the fpc compiler set in the make command is used. If none is set, the first fpc compiler on the path is used.

Unfortunately our firewall does not let svn calls through so I can't use the svn sources at work...

You can download just the sources too. But that is not incremental ...

Vincent

Reply by email

Bo Berglund
to Vincent Snijders
Vincent Snijders wrote 6 lines
If you compile in Lazarus, the fpc compiler which is in the set in the environment options is used. If you compile from the command line, the fpc compiler set in the make command is used. If none is set, the first fpc compiler on the path is used.

Is it possible to install the ARM version of FPC on my Windows PC and then direct Lazarus to use that when compiling so that I can do cross-compilation for the target embedded ARM-based board?

What I mean is if I select to download the ARM FPC compiler is it supposed to run in an ARM environment or can it be run in Windows?

Bo Berglund

Reply by email

Bernd Kreuss
to Bo Berglund: On Thu, 14 Oct 2010 11:03:06 +0300, "Juha Manninen (gmail)" I got fpc-2.4.0.i386-win32…
Bo Berglund wrote
Unfortunately our firewall does not let svn calls through

You should really tell your boss that if you are supposed to work as a software developer you should also be allowed to use the tools that a software developer needs and this includes access to the internet (including FTP, IRC, NNTP, SVN, CVS and a few more) or you simply won't be able to get your *job* done in an efficient manner (or not at all) and it will cost a lot more *time* and *money* and even endanger the success of the whole project!

(Be sure to mention the words *time* and *money*)

What sense does it make if they assign you the job to work with Lazarus/FPC and then not allow you to actually download current versions of these tools and communicate with other developers and research essential knowledge (the newsgroup problem)?

Bernd

Reply by email

Alexsander Rosa
to Bo Berglund: I have tried to port our Delphi7 descendant of TListView to Lazarus but it seems like the…

Is there an example of TListView's CustomDraw?
The following code (found here [1]) did not work:

procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState;
  var DefaultDraw: Boolean);
const
  cStripe = $CCFFCC; // colour of alternate list items
begin
  if Odd(Item.Index) then
    // odd list items have green background
    ListView1.Canvas.Brush.Color := cStripe
  else
    // even list items have window colour background
    ListView1.Canvas.Brush.Color := clWindow;
end;

[1] http://mantis.freepascal.org/view.php?id=9255

2010/10/12 Bo Berglund

Show quoted text 22 lines
I have tried to port our Delphi7 descendant of TListView to Lazarus but it seems like the Lazarus implementation lacks a number of properties that are present in Delphi. Just as an example: There is no Gridlines property available. Is there a more complete implementation available anywhere? I am running Lazarus 0.9.28.2 and FPC 2.2.4 on WindowsXP off of the recommended and installed 2 weeks ago. I also noted via Google that there was some discussion on implementation incompleteness of TListView back in Jan 2008, so surely this should have been fixed by now? -- Bo Berglund Developer in Sweden
Atenciosamente, Alexsander da Rosa Linux User #113925 "Extremismo na defesa da liberdade n?o ? defeito. Modera??o na busca por justi?a n?o ? virtude." -- Barry Goldwater -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101021/cc24a57d/attachment.html>

Reply by email

Bo Berglund
to Bernd Kreuss: You should really tell your boss that if you are supposed to work as a software developer…
Bernd Kreuss wrote 11 lines
On 14.10.2010 11:30, Bo Berglund wrote: > Unfortunately our firewall does not let svn calls through You should really tell your boss that if you are supposed to work as a software developer you should also be allowed to use the tools that a software developer needs and this includes access to the internet (including FTP, IRC, NNTP, SVN, CVS and a few more) or you simply won't be able to get your *job* done in an efficient manner (or not at all) and it will cost a lot more *time* and *money* and even endanger the success of the whole project!

I am not assigned to any particular FPC case at my workplace, this is a project on my free time. But we do work with Delphi a lot at my work and to go platform-independent is very much in line with my day work, so I try to collect as much info as I can also during the days. The particular case of this thread, the use of TListView, is a special case because we use listviews a *lot* and we have "enhanced" TlistView by making our own inherited component, which publishes a few often used properties and methods. Unfortunately this inherited component does not work in Lazarus because of the incomplete translation of TListView from Delphi to FPC/Lazarus...

Concerning SVN, we do not use this at all (still on CVSNT), so opening SVN ports is probably not going to happen...
I had hoped SVN could work on port 80 since it uses http style locators, but apparently it does not work that way.

Bo Berglund

Reply by email

Bernd
to Bo Berglund

2010/10/25 Bo Berglund :

Show quoted text 5 lines
On Mon, 18 Oct 2010 14:32:59 +0200, Bernd Kreuss wrote: I had hoped SVN could work on port 80 since it uses http style locators, but apparently it does not work that way.

Then all you can do is download the

ftp://ftp.freepascal.org/pub/lazarus/snapshots/lazarus-0.9.29-xxxxx-yyyyyyyy-src.zip

unzip it to somewhere (no matter where) and then (*if* you have already a working standalone FPC installed (which will on windows also provide you with make and the other needed tools in your path)) open a command line in this folder and

make bigide

this will give you lazarus.exe (or the lazarus executable on linux) directly at the base of this folder and you can run it directly from within this folder.

The only pitfall is that Lazarus will later also want to see the FPC sources for code completion etc. to work. If you previously installed a binary installer of FPC you also have to download the same FPC version as source code archive and unzip it to somewhere. You don't need to compile FPC itself, you just need a folder with the FPC sources of the same version somewhere on your harddisk so Lazarus can lookup all the RTL and FCL units for its code completion features.

After you started the freshly compiled Lazarus for the first time go to environment->options->files and set the following paths or make sure they are correct:

* path to the lazarus folder (where you just unzipped and compiled Lazarus)
* path to the fpc binary
* path to the fpc source folder

After this everything should work.

And its basically the same procedure on other platforms too. First make sure you have a working FPC that can be used from the command line (pay attention to the version number it reports, in case you have experimented with multiple versions already on this machine) and that can compile a simple hello world program from the command line without errors and then proceed with the steps mentioned above and they should just work out of the box.

If you have done it a few times it is really easy and loses all its perceived complexity.

Bernd

Reply by email