Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Beginners / Can function be used for change event
« Last post by Joanna on Today at 11:30:10 am »
Has anyone ever tried using a function with boolean result for a change event?
Currently I use procedure change_event (sender:tobject);

Sometimes change events get activated when no change actually occurred such as when a tedit loses focus. It would help handle this event easier with something like

Function change_event (sender:tobject):boolean;

So I could do Something like
If not Sendermethod.change_event (sender)
    Then exit;

I believe This type of technique is used for the function encode date and other things.
2
Editor / Re: match automatic highlight on NON matching text?
« Last post by cdbc on Today at 11:30:08 am »
Hi
Correct english would be: AnObject & AnIdentifier. Elegant too...
/AObject/ really hurts my eyes.
Just my 2 cents
Regards Benny
3
Editor / Re: match automatic highlight on NON matching text?
« Last post by WooBean on Today at 11:15:00 am »
Btw, and without wanting to interfere with your teams guidelines, but have you considered: AnObject instead of Aobject ?

Just paralel observation from core Lazarus source code -  there are 22 "AIdentifier" and 31 "AnIdentifier" usages.
We can survive it, anyway.
4
TAChart / Re: Tchart with dual numbers at the axis
« Last post by wp on Today at 10:48:18 am »
The usual way to display unusual values as axis labels is to put them into an extra TListChartSource which then is assigned to the axis' Marks.Source:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. var
  3.   i: Integer;
  4. begin
  5.   ListChartSource1.Clear;
  6.   for i := 0 to 20 do
  7.     ListChartSource1.Add(i*64, i*64);
  8.   Chart1.BottomAxis.Marks.Source := ListChartSource1;
  9. end;
5
Code: Pascal  [Select][+][-]
  1. $ ./compiler/ppcrossmipsel test.pas -Fu./rtl/ps1 -Fu./rtl/inc -Tps1 -a -XP/usr/local/mipsel-unknown-elf/bin/mipsel-unknown-elf- -Cfnone -n -vut
  2. Warning: Source OS Redefined!
  3. Compiler: /home/key-real/vip-code/source/compiler/ppcrossmipsel
  4. Using executable path: /home/key-real/vip-code/source/compiler/
  5. Using unit path: ./rtl/ps1/
  6. Using unit path: ./rtl/inc/
  7. Using unit path: ./compiler/
  8. Using library path: ./rtl/ps1/
  9. Using library path: ./rtl/inc/
  10. Using library path: ./compiler/
  11. Using object path: ./rtl/ps1/
  12. Using object path: ./rtl/inc/
  13. Using object path: ./compiler/
  14. Searching file test.pas... found
  15. (PROGRAM)  Registering new unit SYSTEM
  16. (PROGRAM)  Load from PROGRAM (implementation) unit SYSTEM
  17. (SYSTEM)   Loading unit SYSTEM
  18. Unitsearch: system.ppu
  19. Searching file system.ppu... not found
  20. Searching file SYSTEM.PPU... not found
  21. Unitsearch: system.pp
  22. Searching file system.pp... not found
  23. Searching file SYSTEM.PP... not found
  24. Unitsearch: system.pas
  25. Searching file system.pas... not found
  26. Searching file SYSTEM.PAS... not found
  27. Unitsearch: ./rtl/ps1/system.ppu
  28. Searching file ./rtl/ps1/system.ppu... found
  29. PPU Loading ./rtl/ps1/system.ppu
  30. (SYSTEM)   PPU Name: ./rtl/ps1/system.ppu
  31. (SYSTEM)   PPU Time: 2024/04/23 10:36:02
  32. (SYSTEM)   PPU Flags: 4224
  33. (SYSTEM)   PPU Crc: 81615BB2
  34. (SYSTEM)   PPU Crc: 3FC14DEF (intfc)
  35. (SYSTEM)   PPU Crc: DE388206 (indc)
  36. (SYSTEM)   Number of definitions: 2958
  37. (SYSTEM)   Number of symbols: 7783
  38. (SYSTEM)   PPU Source: ./rtl/ps1/system.pp time 2024/04/22 08:41:06
  39. (SYSTEM)   PPU Source: systemh.inc not found
  40. (SYSTEM)   PPU Source: sysosh.inc not available
  41. (SYSTEM)   PPU Source: rtldefs.inc not available
  42. (SYSTEM)   PPU Source: filerec.inc not available
  43. (SYSTEM)   PPU Source: textrec.inc not available
  44. (SYSTEM)   PPU Source: innr.inc not available
  45. (SYSTEM)   PPU Source: cpuh.inc not available
  46. (SYSTEM)   PPU Source: ../mips/cpuh.inc not available
  47. (SYSTEM)   PPU Source: currh.inc not available
  48. (SYSTEM)   PPU Source: ustringh.inc not available
  49. (SYSTEM)   PPU Source: setjumph.inc not available
  50. (SYSTEM)   PPU Source: ../mips/setjumph.inc not available
  51. (SYSTEM)   PPU Source: rttih.inc not available
  52. (SYSTEM)   PPU Source: objpash.inc not available
  53. (SYSTEM)   PPU Source: varianth.inc not available
  54. (SYSTEM)   PPU Source: dynarrh.inc not available
  55. (SYSTEM)   PPU Source: compproc.inc not available
  56. (SYSTEM)   PPU Source: heaph.inc not available
  57. (SYSTEM)   PPU Source: threadh.inc not available
  58. (SYSTEM)   PPU Source: dynlibh.inc not available
  59. (SYSTEM)   PPU Source: resh.inc not available
  60. (SYSTEM)   PPU Source: excepth.inc not available
  61. (SYSTEM)   PPU Source: system.inc not available
  62. (SYSTEM)   PPU Source: sysos.inc not available
  63. (SYSTEM)   PPU Source: mips.inc not available
  64. (SYSTEM)   PPU Source: ../mips/mips.inc not available
  65. (SYSTEM)   PPU Source: generic.inc not available
  66. (SYSTEM)   PPU Source: set.inc not available
  67. (SYSTEM)   PPU Source: ../mips/set.inc not available
  68. (SYSTEM)   PPU Source: genset.inc not available
  69. (SYSTEM)   PPU Source: gencurr.inc not available
  70. (SYSTEM)   PPU Source: sstrings.inc not available
  71. (SYSTEM)   PPU Source: int64p.inc not available
  72. (SYSTEM)   PPU Source: ../mips/int64p.inc not available
  73. (SYSTEM)   PPU Source: int64.inc not available
  74. (SYSTEM)   PPU Source: astrings.inc not available
  75. (SYSTEM)   PPU Source: ustrings.inc not available
  76. (SYSTEM)   PPU Source: aliases.inc not available
  77. (SYSTEM)   PPU Source: rttidecl.inc not available
  78. (SYSTEM)   PPU Source: dynarr.inc not available
  79. (SYSTEM)   PPU Source: objpas.inc not available
  80. (SYSTEM)   PPU Source: except.inc not available
  81. (SYSTEM)   PPU Source: variant.inc not available
  82. (SYSTEM)   PPU Source: rtti.inc not available
  83. (SYSTEM)   PPU Source: setjump.inc not available
  84. (SYSTEM)   PPU Source: ../mips/setjump.inc not available
  85. (SYSTEM)   PPU Source: sysheap.inc not available
  86. (SYSTEM)   PPU Source: heap.inc not available
  87. (SYSTEM)   PPU Source: thread.inc not available
  88. (SYSTEM)   PPU Source: threadvr.inc not available
  89. (SYSTEM)   PPU Source: dynlib.inc not available
  90. (SYSTEM)   PPU Source: sysfile.inc not available
  91. (SYSTEM)   PPU Source: text.inc not available
  92. (SYSTEM)   PPU Source: file.inc not available
  93. (SYSTEM)   PPU Source: typefile.inc not available
  94. (SYSTEM)   PPU Source: isotmp.inc not available
  95. (SYSTEM)   PPU Source: sysdir.inc not available
  96. (SYSTEM)   PPU Source: sysres.inc not available
  97. (SYSTEM)   Finished loading unit SYSTEM
  98. Searching file test.pas... found
  99. Searching file test.pas... found
  100. Searching file test.pas... found
  101. (PROGRAM)  Registering new unit FPINTRES
  102. (PROGRAM)  Load from PROGRAM (implementation) unit FPINTRES
  103. (FPINTRES) Loading unit FPINTRES
  104. Unitsearch: fpintres.ppu
  105. Searching file fpintres.ppu... not found
  106. Searching file FPINTRES.PPU... not found
  107. Unitsearch: fpintres.pp
  108. Searching file fpintres.pp... not found
  109. Searching file FPINTRES.PP... not found
  110. Unitsearch: fpintres.pas
  111. Searching file fpintres.pas... not found
  112. Searching file FPINTRES.PAS... not found
  113. Unitsearch: ./rtl/ps1/fpintres.ppu
  114. Searching file ./rtl/ps1/fpintres.ppu... not found
  115. Searching file ./rtl/ps1/FPINTRES.PPU... not found
  116. Unitsearch: ./rtl/ps1/fpintres.pp
  117. Searching file ./rtl/ps1/fpintres.pp... not found
  118. Searching file ./rtl/ps1/FPINTRES.PP... not found
  119. Unitsearch: ./rtl/ps1/fpintres.pas
  120. Searching file ./rtl/ps1/fpintres.pas... not found
  121. Searching file ./rtl/ps1/FPINTRES.PAS... not found
  122. Unitsearch: ./rtl/inc/fpintres.ppu
  123. Searching file ./rtl/inc/fpintres.ppu... not found
  124. Searching file ./rtl/inc/FPINTRES.PPU... not found
  125. Unitsearch: ./rtl/inc/fpintres.pp
  126. Searching file ./rtl/inc/fpintres.pp... found
  127. Searching file test.pas... found
  128. test.pas(1,6) Error: Compilation raised exception internally
  129. Fatal: Compilation aborted
  130. An unhandled exception occurred at $0000000000570E35:
  131. EAccessViolation: Access violation
  132.   $0000000000570E35  push,  line 1936 of symdef.pas
  133.   $00000000007C68FE  AddUnit,  line 204 of pmodules.pas
  134.   $00000000007C7634  CheckAddUnit,  line 384 of pmodules.pas
  135.   $00000000007C72FF  loaddefaultunits,  line 426 of pmodules.pas
  136.   $00000000007CE667  proc_program,  line 2837 of pmodules.pas
  137.   $00000000004E1779  compile_module,  line 488 of parser.pas
  138.   $0000000000517559  continue,  line 269 of ctask.pas
  139.   $00000000005177BF  processqueue,  line 334 of ctask.pas
  140.   $000000000043E12F  Compile,  line 310 of compiler.pas
  141.   $0000000000401496  $main,  line 308 of pp.pas
  142.   $000000000043372D  SysEntry,  line 332 of system.pp
  143.  
  144.  
6
General / Re: Generics - correct syntax
« Last post by VisualLab on Today at 10:23:16 am »
I don't know what to tell you?

Basically the question was for people who know something about the documentation detailing generic types in FPC mode. Of course, I do not rule out that there is no detailed documentation on this subject. Still, it would be very useful. Programming using the "Macayev method" (also known as the "Grope method", "battle reconnaissance" or "trial and error :)) is ineffective and error-prone.
7
Editor / Re: match automatic highlight on NON matching text?
« Last post by Чебурашка on Today at 10:07:45 am »
Maybe there should be options for:
- toggling "highlight current selection"
- disable during search and replace

This is what I hoped...

There are some other ways of renaming stuff.

I know that there are some refactoring tools, but I am not confident in them. I my programming life I had bad experiences with blind renaming, so I never use them. Maybe because when I started doing software I used very poor tools.
8
Editor / Re: match automatic highlight on NON matching text?
« Last post by Чебурашка on Today at 10:04:24 am »
Btw, and without wanting to interfere with your teams guidelines, but have you considered: AnObject instead of Aobject ?

Simply we set the convention that all parameters class methods must start with A<something>, regardless of what is after. Then for classes, the fields with start with F<something> while when exposed they will be just <Something>. We extended the A rule also to all procs.

Of course AnObject is a more elegant English, but then one has to think about when the AnObject has to be tranformed into ASome/Many/Multiple/SeveralObjects or AnObjectsList in case input becomes a list. I prefer a simpler Aobject/Aobjects, taste.

9
General / Re: Compile/Convert Delphi project to MacOS
« Last post by TRon on Today at 09:59:52 am »
Hello :D,
Hi !

Quote
Any hint or help would be highly appreciated  :D
See thread.
10
General / Compile/Convert Delphi project to MacOS
« Last post by Joseph on Today at 09:49:15 am »
Hello :D,

(beginner's question) I have a compiled Delphi project that works as expected on a Windows. I'd like to use the source code to compile it for the Mac as well, but I'm at a sticking point.

The project basically contains 6 .pas files and 1 .dpr file.

I have installed Lazarus (following the tutorial here
https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_macOS), then FPC.

I then converted the Delphi project into a Lazarus project using the tool provided in Lazarus. It worked as expected (some modifications in the files and appearance of a .lpr as well as .lpi etc).

I then try to compile the project. I've tried both "Compile" and "Clean up and Build", but both lead to the same errors after about 10/15 seconds of compilation:

- Error: -macosx_version_min has been renamed to -macos_version_min
- Error: linker: Undefined symbols for architecture x86_64:
- Error: linker: "WSRegisterBevel", referenced from:
- Error: ld: symbol(s) not found for architecture x86_64
- and finally: Error: Error while linking

There is definitely something related to the linker, but I can't find what the problem actually is and/or what should I do.

I should point out that I've managed to compile and run simple hello world type programs without any problems.

I use:
- MacOS Sonoma 14.4.1
- Lazarus 3.2
- FPC 3.2.2

Any hint or help would be highly appreciated  :D
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018