Recent

Author Topic: [ANN] fpGUI Toolkit v2.0.3 release  (Read 2876 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2726
    • http://www.cdbc.dk
Re: [ANN] fpGUI Toolkit v2.0.3 release
« Reply #15 on: February 26, 2026, 12:56:25 am »
Hi Graeme
· It's with -dAGGCanvas
· KDE's / QT's global scaling is 100%  (kde v6.6.x)
· Pretty old lappy, 1366 * 768
· I haven't fiddled with dpi, so it's what PCLinuxOS does std. on this HP
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2726
    • http://www.cdbc.dk
Re: [ANN] fpGUI Toolkit v2.0.3 release
« Reply #16 on: April 13, 2026, 10:50:24 am »
Hi Graeme
I've got a question:
· Is it illegal to use 'fpgPostMessage()' outside of the 'fpGUI' framework?!?
:: With 'outside' I mean within the same application, but not descending from e.g.: 'TfpgWidget' ::
I'm using it in my 'Presenter' to pass messages from a threadsafe queue, to notify the 'Presenter' to deQueue items from the queue and dispatch them in the main thread to the GUI through an observer-pattern... In doing that, I'm getting an obscure AV in
Code: Pascal  [Select][+][-]
  1. function FindKeyboardFocus: TfpgWidget;
  2. begin
  3.   Result := nil;
  4.  
  5.   if FocusRootWidget <> nil then
  6.   begin                            {$ifdef dbg} lsl.Append(FocusRootWidget.ClassName); {$endif}
  7.     Result := FocusRootWidget; /// <--- STOPS HERE
  8.     while (Result <> nil) and (Result.ActiveWidget <> nil) do {$ifdef dbg} begin lsl.Append(Result.ActiveWidget.ClassName);{$endif}
  9.       Result := Result.ActiveWidget; {$ifdef dbg} end; {$endif}
  10.   end;
  11. end;
from 'fpg_widget'.
-- Do I __really__ have to use a timer  :( I find the above msg-solution more elegant ;)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

cdbc

  • Hero Member
  • *****
  • Posts: 2726
    • http://www.cdbc.dk
Re: [ANN] fpGUI Toolkit v2.0.3 release
« Reply #17 on: April 13, 2026, 03:14:21 pm »
Hi again
Right so I solved it, one should really keep the messaging system within 'TfpgWidget' descendants, learnt my lesson ;)
Ok so I've been playing with 'fpGUI', learning the ropes, nifty piece of kit \o/
If you'd like to see it, it's parked HERE in my Gitlab crib...
For the time being, Only @Aruna will be able to compile it, because it utilizes my P.I.S.S. (P)lug(I)n (S)ervices (S)olution -framework, which hasn't been released into the wild yet... /sorry/ you'll just have to wait for it...
Regards Benny

edit: Alas, I ended up abondoning the fpg_messagequeue approach and had to implement a polling timer, to avoid unpredictable AVs from the fpgui-messaging-system, I suspect, that 'fpgPostMessage' and friends are not entirely threadsafe... I dunno  %)
It seems to be working fine now  ;D
« Last Edit: Today at 01:41:41 am by cdbc »
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

 

TinyPortal © 2005-2018