Questions tagged [lazarus]

Lazarus is an open-source multiplatform RAD environment for the Free Pascal compiler, in the spirit of Delphi, with which it has a fairly high degree of compatibility.

Lazarus is a an open-source multiplatform RAD environment for the Free Pascal compiler, in the spirit of Delphi, with which it has a fairly high degree of compatibility.

See http://lazarus.freepascal.org

1306 questions
6
votes
3 answers

Setting a DBGrid column format in Delphi

I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how?
Blue
  • 383
  • 2
  • 7
  • 16
6
votes
3 answers

Remove Path From File Name

I'm developing a program that needs to parse the file name into a TTextField. How to remove the file extension I've already know(or think that I can do like this): var FName: String; FPath: String; begin FPath := OpenDialog1.FileName; FName…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
6
votes
0 answers

How to send SNMP v2 trap using Ararat Synapse?‏

I've tried to modify the TrapSend.dpr sample project which I downloaded from http://synapse.ararat.cz/files/contrib/Trap.zip to send SNMP v2 traps without success. Note: I'm able to successfully send SNMP v1 traps using the sample. This is the…
Joshua
  • 1,709
  • 2
  • 24
  • 38
6
votes
2 answers

Lazarus coding style guide

Style Guide? Other than http://wiki.freepascal.org/Coding_style is there a style guide that represents the style followed by a notable and large body of work in Lazarus ( and/or FPC and/or Delphi) or some sort of widespread concensus. Example I'm…
RedGrittyBrick
  • 3,827
  • 1
  • 30
  • 51
6
votes
1 answer

How do I convert code between OmniXML and Delphi's own XML library?

I recently started using OmniXML primarily because it can be used for both Delphi and Lazarus. I myself am a beginner when it comes to XML, and this is where I hope I can learn some things or avoid doing any bad things I may already be doing. For…
user1175743
6
votes
1 answer

Syntax rules for Lazarus Pascal procedural "Units"

I organise my app's source code into Pascal compilation Units using File -> New Unit The following Unit compiles OK ... unit CryptoUnit; {$mode objfpc}{$H+} interface function Encrypt(key, plaintext:string):string; function Decrypt(key,…
RedGrittyBrick
  • 3,827
  • 1
  • 30
  • 51
6
votes
1 answer

Differences in Form Initialization between Delphi and Lazarus?

MainForm creates some secondary Frame objects at runtime to display various option panels. Here's a typical constructor for one of those frame classes (they each extend TFrame): constructor Tframe2.Create(AOwner: TComponent); begin inherited; …
Jessica Brown
  • 8,222
  • 7
  • 46
  • 82
6
votes
2 answers

How to use a method of an object stored in a TList?

My question is pretty simple. I have a TList (called queue) containing objects of class CNotif and want to use the method is_alive on those objects. The problem is, when I use queue.Items[0].is_alive(), I get an error message saying Error: Illegal…
halflings
  • 1,540
  • 1
  • 13
  • 34
5
votes
1 answer

Installing package without IDE on Lazarus from command line

I am trying to automate installing of my package to IDE from the command line using (this) article. When using IDE the package is installed correctly and my components appear on Lazarus palette. To verify the article steps, after installation with…
AlexeyDaryin
  • 903
  • 6
  • 15
5
votes
3 answers

Perform POST request with Lazarus

How can I perform a POST request with Lazarus? I found that it is possible to do using Indy for Lazarus, but the installation of Indy itself is a bit of a hassle, having to recompile and all. Is there another way?
Shade
  • 9,936
  • 5
  • 60
  • 85
5
votes
3 answers

Writing code for a Mac using Lazarus

I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus. Question is.…
Daniel Casserly
  • 3,552
  • 2
  • 29
  • 60
5
votes
1 answer

Reading constants into an SSE/AVX registers in inline assembly

I'm trying to import a .o file from Lazarus into Delphi. function Test: boolean; const TestData: array[0..15] of byte = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); asm movdqu xmm0,[rip+testData] //xmm0 should be all zeros pcmpeqq xmm1,xmm1 …
Johan
  • 74,508
  • 24
  • 191
  • 319
5
votes
3 answers

indy GET dowloading speed

Welcome, I have to create caption with information about downloading speed in my application using indy http get compontent. In my mind i found simple solution. At onwork event i will get actual progress of downloading (size) and compare it with…
marc
  • 2,963
  • 7
  • 24
  • 25
5
votes
2 answers

Why doesn't calling a function with identical signatures in different units result in compiler error?

Why doesn't this code result in a compiler error? I would have expected error for example 'ambiguous call to "CallMe"'. Is this a bug in the compiler or in the language? This can worked around by using the unit name and a dot in front of the…
Allan Ojala
  • 694
  • 10
  • 22
5
votes
1 answer

Is there an option analogous to Delphi "Use debug DCUs" in Lazarus

I'd like to debug Lazarus library code. In Delphi IDE I would simply check the Project Options -> Compiler -> Use Debug DCUs option on. Is there something similar in Lazarus?
Max
  • 19,654
  • 13
  • 84
  • 122