Forum > Other

FPGui fpgApplication onidle


Allthough not many people may use it, may be someone can help.

I set my method to the onidle of the fpgapplication (which is set as TNotifyEvent) but the program doesn't call it.
May be I missing something. Has anyone done this so far?

Regards relocate

It should be called, unless! the application's main thread contains a loop in such a way that it never idles.
Note that I have not used fpGui for a quite a long time - I really should use it more - but afaicr it worked at least under linux 64 (Debian flavors)
We need to have some sourcecode that replicates this
We also need to know which platform, OS, CPU, bitness, versions. "It doesn't work" is not very informative.

I also thought it would work, but it doesn't.
I only found a discussions from Graeme how to implement onidle, unfortunately no example on how to use it.

Windows 64bit (CPU:Intel, how could this help it should run on any CPU, so far).
I use the last Stable/Maint Version of FPGui (1.4) and at the moment FPC 2.6.4 (I think this shouldn't be the problem).

I'm only using FPC and FPGui not Lazarus.

I hope this is enough

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TMainForm.NoteMe(Sender:TObject);begin  writeln('Not busy');end; procedure TMainForm.AfterCreate;begin  Name := 'Test';  SetPosition(376, 600, 800, 600);  WindowTitle := 'Test';  Hint := '';  WindowPosition := wpScreenCenter;  fpgApplication.OnIdle := @NoteMe;end; var frm: TMainForm; begin  frm := TMainForm.Create(nil);  fpgApplication.Initialize;  try    frm.Show;    fpgApplication.Run;  finally    frm.Free;  end;end.


[0] Message Index

Go to full version