* * *

Recent Posts

Pages: [1] 2 3 ... 10
General / Re: Program lock up
« Last post by Handoko on Today at 04:36:33 am »
Was it a program created using Lazarus or the Lazarus itself? I never experienced such the thing you mentioned. But I remember the older versions of Lazarus were buggy. Your Lazarus IDE is very old, you should the use newer versions. Many features have been added, less bugs and more stable. Maybe the bug you experienced is already fixed too.
General / Program lock up
« Last post by user5 on Today at 03:51:33 am »
    On one occasion I stretched the bottom border of a Lazarus program page down into the task bar area of the computer screen and when I released the border that page and the whole program it was a part of locked up so bad that I had to use the Task Manager to shut the main program down. It was as if the program was lost in an unescapable loop but I know that no loop was running. This problem has never happened again but it's particularly disturbing because it apparently has nothing to do with the program code which unfortunately means that there's nothing I can change to fix it. That page worked fine after the main program was restarted.
    Perhaps it was just a fluke, one-time event. I don't expect that this odd problem will ring a bell with anyone but I have to ask just in case it's happened to someone else.
    If it ever happens again but I still can't find the solution then one thing I could do which I've done on other occasions would be to make a separate program out of that page. That way, if it ever locks up again then at least it could be shut down without needing to shut down the main program. It would be better to understand what happened. I'm using Windows 10 and Lazarus 1.0.10. All praise to Lazarus.
BGRABitmap and LazPaint / Re: BGRABitmap demo projects
« Last post by josh on Today at 01:51:14 am »

thanks, I removed the Round(x),y so it is now just x,y

When I compile and run, all is ok, but if Turn On debig, and then compile and run and exit the demo, I get loads of unfreed memory blocks???

ps. Very impressive though :+)
BGRABitmap and LazPaint / Re: BGRABitmap demo projects
« Last post by lainz on Today at 01:31:03 am »
Try on 1.8.4

Trunk is not very good

Edit: remove the 'round(x)' and 'round(y)' in the line given the error, and it will work fine in trunk.
Loaded is called when your program loads the properties from the resource of your EXE.

basically when all the properies get streamed from the file the LOADED method gets called to allow you
to do some additional settings, it also sets the csLoaded to true.

The IDE does not do this, it creates the control and sets only what is needed for the IDE and does not
read the values from the stream.

BGRABitmap and LazPaint / Re: BGRABitmap demo projects
« Last post by josh on Today at 12:59:29 am »

I tried voxel but am getting error, windows 10 64, latest bgrabitmap and controls via opm.

Code: [Select]
Compile Project, Target: voxel.exe: Exit code 1, Errors: 1, Hints: 4
umain.pas(26,59) Hint: Parameter "Shift" not used
umain.pas(27,57) Hint: Parameter "Shift" not used
umain.pas(167,50) Error: Can't determine which overloaded function to call
bgradefaultbitmap.pas(1847,29) Hint: Found declaration: GetPixel(Single;Single;TResampleFilter=`1`;Boolean=`TRUE`):<record type>;
bgradefaultbitmap.pas(1817,29) Hint: Found declaration: GetPixel(LongInt;LongInt):<record type>;

Latest Lazarus and FPC trunk.

Any ideas?

This is a very simple demo component:

Code: Pascal  [Select]
  1. unit TestComponent;
  3. {$mode objfpc}{$H+}
  5. interface
  7. uses
  8.   Classes, SysUtils, Dialogs, StdCtrls;
  10. type
  11.   TTestComponent = class(TCustomListBox)
  12.   protected
  13.     procedure Loaded; override;
  14.   end;
  16. procedure Register;
  18. implementation
  20. procedure TTestComponent.Loaded;
  21. begin
  22.   Inherited Loaded;
  24.   Items.Text:= 'TEST OKAY'; Invalidate;
  25. end;
  27. procedure Register;
  28. begin
  29.   RegisterComponents('My Stuff',[TTestComponent]);
  30. end;
  32. end.

Well, If I drop this component to the form, the Loaded won't start as I see. This is normal?
If I running the project, Loaded is works. I know, I can use CreateWnd, but the question is the Loaded, because I see FileCtrl/TFileListBox component source, so this component override only the Loaded method, and files appear after TFileListBox component droped to the form, so I think Loaded is works... but how?

General / Re: Dynamic arrays ...
« Last post by ASBzone on June 17, 2018, 11:34:30 pm »
In my application I am copying large amounts of floats, some 50 million values or  more, from one array to another, performing a simple filter operation; for instance, values outside a certain range are discarded. The target array will therefore be smaller than the original. I started with incrementing the size with each new element copied across, but that became very noticeably slower as the target array grew in size. Blockwise allocation speeded it up quite significantly.

I tested prime numbers up to 50,000,000 and finally saw a measurable difference in performance between pre-allocating the array size to the max likely number...

By the time we get to 50 million (which brings us into the millions of prime numbers), I saw a difference of 5 seconds between starting the array at full size, and starting at 25 elements and growing as needed.    8)
General / Re: Anchors on a child form
« Last post by Martin Wynne on June 17, 2018, 10:26:19 pm »
Thanks for the replies. I haven't been able to replicate the Delphi behaviour exactly, so I've decided to live with the Lazarus behaviour for now. It's annoying, but not the end of the world.

BGRABitmap and LazPaint / Re: BGRABitmap demo projects
« Last post by lainz on June 17, 2018, 09:46:11 pm »
Glad you like my voxel demo.  :)

I tried your projects. Waves and hello world 2 works fine.

I am not quite understanding the "mouse down and draw circles". Also it does not seem to use OpenGL. Am I missing something?

Oh, maybe I just remember it bad, I think it was using OpenGL, but I not checked that, just grabed the source and put in the repository  :) I'm editing my previous post.

If you press the mouse button and draw a circle, it adds score at the top left. (Notice that the algorythm is not perfect, and it maybe adds score as well if you don't draw a perfect circle, it can be tweaked).

I've added a new test project, but this time in BGRAControls:

Edit: I forget that this requires the material design package... maybe it's a good idea to move that button to BGRAControls. In fact BGRAControls had the first material design button, but I've improved it a lot in the other package.

I had more projects, but I have the bad habit to delete anything I don't use  :(
Pages: [1] 2 3 ... 10


Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus