Recent Posts

Pages: [1] 2 3 ... 10
General / Re: Is there any similar to async/await ?
« Last post by HeavyUser on Today at 06:06:03 pm »
There are 2 multi threading models. 1) preemptive multitasking where the task manager will loop through the active threads stopping and running them as needed. 2) cooperative multitasking where each thread must yeld control to the manager to run the next thread in regular intervals.
Both models use threads with the same properties/abilities, only the manager/scheduler is different.

Cooperative multitasking is more doable in VM languages, where each entry into the VM may cause the thread to yield if necessary.
I have no experience with VM languages and that sounds something I should know already. Any references to read upon it? I'd like to understand your comment.
BGRABitmap and LazPaint / Re: New version of BGRABitmap
« Last post by josh on Today at 05:59:31 pm »
Hi Circular,

It does not make a difference, I have even deleted the package lib folder to remove all compiled code, and forced a clean rebuild.
Note this on Trunk version. ( same on updating my existing trunk install, and on a fresh trunk install).
My internet speed is not great, so I will attempt another FRESH Carbon Trunk install over the weekend.

I have tested RC2, and 1.8.5 of carbon i386 and these work fine, latest carbon trunk exhibits the problem, latest cocoa trunk is fine compiling for cocoa, but cross compiling back to carbon the problem is there, the shape is not drawn.

I am pretty sure its a trunk issue, and as the upcoming rc3 is due soon, I am concerned that the issue will move into RC3.

NOte used BGRABITMAP 9.8.2 and the latest, as well as 4.6.2 of bgracontrols and the latest 6 version, all are doing the same. and all work fine on rc2 and 1.8.5
LCL / Re: How to capture horizontal mouse scroll event?
« Last post by VTwin on Today at 05:10:59 pm »

Take a look at the documentation. 0 wasn't a bad idea, the form handle neither.

But I guess another important question would be how these events are triggered. Is the second one available immediately while still reacting to the first one? Are multiple horizontal ones triggered after multiple vertical ones, for example?

I saw an example with handle = 0, and figured the Form would default. Either way, no dice. Good point, perhaps calling PeekMessage within the handler will not work.

I did wonder about how many and when the events would fire: hvhvhv, vhvhvh, vvhhvvhh? I was hoping for a clean solution, ah well.
If the Delphi version is working, we can start to try and merge what we can into the dev branch.
BGRABitmap and LazPaint / Re: BGRA bitmap canvas2D transform
« Last post by circular on Today at 05:08:02 pm »
Indeed, restore is to be called after the drawings.
BGRABitmap and LazPaint / Re: New version of BGRABitmap
« Last post by circular on Today at 05:06:30 pm »
Hi josh. Does it help to go in the package and to a clean build?
LCL / Re: How to capture horizontal mouse scroll event?
« Last post by VTwin on Today at 05:03:31 pm »
Not sure if it will work but you could try using the handle of PaintBox.Canvas or overriding PaintBox.WindowProc

No dice with PaintBox.Canvas.Handle. :(
Windows / Re: Why is an exe not running when Lazarus IDE is not used ?
« Last post by josh on Today at 04:55:35 pm »

Had a quick look at the code.
Some things to check in form create
What happens to these values when file is not found, also what happens if the file structure is not as you expect.
strtoint could cause a crash if text is not an integer maybe use strtointdef instead, as it has extra parameter to set a default value if strtoint is invalid.

Code: [Select]
if fileexists( cFile ) then
    with tStringList.create do
        LoadFromFile( cFile );
        MASTERform.Top    := strtoint(Strings[0]);
        MASTERform.Left   := strtoint(Strings[1]);
        schijfeenheid.Text := trim( Strings[2] );
        folder.Text        := trim( Strings[3] );
        appl.Text          := trim( Strings[4] );
        foto_base.Text     := trim( Strings[5] );
        thumbhoogte.Text   := trim( Strings[6] );

at end of form.create put a breakpoint and check all the values are what you think they should be.

noticed various strtoint same as above.
noticed that your dividing /  what would happen if this value is very low or even 0; I would add some checks before any division to stop odd behaviour/crashes.  Data is not always valid so always check data before any operations are done on them.

Not sure of the use of thebutton in your button click event; when your assigning it to sender.
could you use ?
Code: [Select]
if sender is tbutton then
  if tbutton(sender).tag=1 then

Just some quick observations; not have time to compile/test.
Windows / Re: Why is an exe not running when Lazarus IDE is not used ?
« Last post by rvk on Today at 04:54:59 pm »
You could try stripping the program (first make a backup).
Strip all the database components.
Then strip all other components.
In between test the program to see if it runs.

Once it runs you'll know what components are causing the problem.
(But my guess is still that it is from the outside but stripping components might provide some insight to when that process is going to kill your program)
Windows / Re: Why is an exe not running when Lazarus IDE is not used ?
« Last post by WimVan on Today at 04:50:41 pm »
I'll leave the connection so the program is not looking for data.  Even then it fails to open it.
GIve now some time
Pages: [1] 2 3 ... 10