Jump to content

FabDev

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

3 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes it's not so complicated. But find an already done (and tested) function is often less time lost. Some component has this kind of function but not always easy to find/extract. Finally a colleague, which has code a lot on assembler on Atari 68000/68030 (Doom version) , took a nasty pleasure to code this function with a lot of SHR and boolean operator 😉. So it will not take a lot of time to execute even on CPU with 8 Mhz clock speed 😉
  2. FabDev

    SOAP/WSDL with Python4Delphi

    Hello SoulFlesh, Thank you for answer. We don't need parallelisation and high performance. We need, for example, get a value from another software/database. And in most of these cases the user has to wait the response. Another alternative was to use CEF (Chromium Zmbeded Framework + javascript) but it's take a lot of memory : Like all webbrowser => "Hello world" at 500 mb of memory ! Best regards,
  3. Hello, In my software I use TMS Scripter which is a very efficient, stable and powerful component. But I need more and more to handle Webservice (SOAP). And TMS Scripter can't dynamically handle Webservice : It's need Delphi/import WSDL and import library (translate) for TMS Scripter and recompile my software. Other way is to manually handle http/xml etc... Python (With Zeep) seems to be able to handle (more easily ?) webservice WDSL ? So my idea is to use TMS Scripter (which know my business object classes) + Python4Delphi (for SOAP handling). Does it a good or a bad idea ?
  4. Hello, I'am looking since a few time, without any success, a function which return me a gradient (Tcolor) from an array of double (or integer) value. For example : Const REVENUE_ARRAY: array [1 .. 5] of integer= (10,15,30,45,60); Result with a gradient from Yellow to red : 10 => Yellow ... 30 => Orange ... 60 => Red My purpose is to fill a MAP ShapeFile items (Devexpress MAP) with a gradient which correspond to a Revenue array ( REVENUE_ARRAY)
  5. FabDev

    SynEdit preferred version?

    Hello, I have miss something but in new version I have lost "Code Template" ( Ctrl+J Invoke code templates also called code snippets in Delphi). Something very useful ! In old version this worked fine : https://github.com/pyscripter/SynEdit-2/blob/master/Source/SynEditAutoComplete.pas I have updated old code source "SynEditAutoComplete.pas" but I need to manually invoke in a my Synedit.OnKeydown : { with fAutoComplete: SynEditAutoComplete.TSynAutoComplete2; TSynAutoComplete renamed to TSynAutoComplete2 because it's exist in synedit code source } fAutoComplete.Execute(Snedit1); In attachment old sample "AutoCompleteDemo.dpr" AutoCompleteDemo.zip
  6. Hello, Free eBook : Delphi High Performance By Primož Gabrijelčič Publication date: Feb 2018 Pages: 336 Build fast, scalable, and high performing applications with Delphi Here only today : https://www.packtpub.com/free-learning
  7. FabDev

    SynEdit preferred version?

    Hello, I try to compile this version : https://github.com/TurboPack/SynEdit On my Delphi RIO 10.3.3, I try to compile "SynEditDR260.BPL" and I get this error : [dcc32 Erreur] SynDWrite.pas(786): E2003 Identificator not declared : 'DWRITE_WORD_WRAPPING_EMERGENCY_BREAK' Of course I have deleted : {$IF CompilerVersion <= 32} and it's work. But when I open demos like "PrintDemo" I get some error about properties that doesn't exists for exampe : - SynPasSyn.options.AutoDetectLineLimit - SynPasSyn.options.Visible So does I use the correct version ?
  8. FabDev

    SynEdit preferred version?

    Hello, I use old version : Synedit version 1.04 (2020-04-14) with TMS Scripter I will migrate to Pyscripter version because of some new very interesting feature like Gutter.ShowModification. Thanks PyScripter for your job ! But I need time to implement these (must have 😉) shortcuts before : https://github.com/Kryuski/Editor-Shortcuts
  9. FabDev

    TMemo set tab width (tab stops)

    Hello, Like described here : How to set tab stops in a TMemo In a TMemo in VCL it's possible to set the tab width using such a code : Memo1.Perform( EM_SETTABSTOPS, 1, LongInt(@lTabWidth)); or SendMessage(Memo1.handled, EM_SETTABSTOPS, 1, Longint(@lTabWidth)); But does it exist a way to do the same on FMX ? Because if have tried this : {$IFDEF MSWINDOWS} SendMessage(TWinWindowHandle(Memo1).Wnd, EM_SETTABSTOPS, 1, Longint(@lTabWidth)); {$ENDIF} Off course only on Windows but it's doesn't work ! I find nothing in Memo1.model. So does it exists a way to do it on all platforms (IOS, Android, MAcos etc..) ?
  10. FabDev

    Report Builder + HTML Library + Office Library.

    Hello Alexander, The same is possible on Fast Report ?
  11. I confirm that HTMLLibrary is an awesome HTML library. Congratulation Alexander 😉 But for the SQL parser of HTML library I don't find how to transform this : Peter or "Bibi Paulo" and John to a where clause to search on a field : select xxx where Name containing 'Peter' or Name containing 'Bibi Paulo' and Name containing 'John'
  12. FabDev

    TListView filled by Thread = Freeze

    Thank you very much Dalija, your version work fine (tested on Windows and Android) . Thank you to all other for interesting answer !
  13. FabDev

    TListView filled by Thread = Freeze

    You means that : procedure TForm1.Button2Click(Sender: TObject); begin AniIndicator1.Visible := True; AniIndicator1.Enabled := True; ListView1.enabled:=false; ListView1.beginupdate; FMyThreadTerminated:=false; FMyThread:=TThread.CreateAnonymousThread(procedure () //TThread.queue(TThread.Current, procedure () // Total: Integer; var I: Integer; begin for I := 1 to MaxValue do begin TThread.queue (TThread.Current, procedure () begin ListView1.Items.Add.Text := 'Th: ' + I.ToString; Button2.text:= i.tostring; // On windows this is needed to update AniIndicator {$IFDEF MSWINDOWS} if (GetQueueStatus(QS_ALLINPUT) <> 0) then {$ENDIF} begin // Application.ProcessMessages; end; end ); if application.Terminated then begin break; end; end; TThread.queue (nil, procedure () begin NotifyComplete; end); end); FMyThread.FreeOnTerminate:=false; FMyThread.Start; end; But it's doesn't work ! But this work fine excepted my TAniIndicator on Windows which work only with a Application.processMessage, but it's work fine on IOS : procedure TForm1.Button2Click(Sender: TObject); begin AniIndicator1.Visible := True; AniIndicator1.Enabled := True; ListView1.enabled:=false; ListView1.beginupdate; FMyThreadTerminated:=false; FMyThread:=TThread.CreateAnonymousThread(procedure () //TThread.queue(TThread.Current, procedure () // Total: Integer; var I: Integer; begin for I := 1 to MaxValue do begin TThread.Synchronize(TThread.Current, procedure () begin ListView1.Items.Add.Text := 'Th: ' + I.ToString; Button2.text:= i.tostring; // On windows this is needed to update AniIndicator {$IFDEF MSWINDOWS} if (GetQueueStatus(QS_ALLINPUT) <> 0) then {$ENDIF} begin // Application.ProcessMessages; end; end ); if application.Terminated then begin break; end; end; TThread.queue (nil, procedure () begin NotifyComplete; end); end); FMyThread.FreeOnTerminate:=false; FMyThread.Start; end;
  14. FabDev

    TListView filled by Thread = Freeze

    It's work but now to have my TAniIndicator and button2.text changing I have had to call Application.ProcessMessages on each platform (Windows, IOS, MacOs...) : procedure TForm1.Button2Click(Sender: TObject); begin AniIndicator1.Visible := True; AniIndicator1.Enabled := True; ListView1.enabled:=false; ListView1.beginupdate; FMyThreadTerminated:=false; FMyThread:=TThread.CreateAnonymousThread(procedure () begin TThread.queue (TThread.Current, procedure () var I: Integer; begin for I := 1 to MaxValue do begin ListView1.Items.Add.Text := 'Th: ' + I.ToString; Button2.text:= i.tostring; // On windows this is needed to update AniIndicator {$IFDEF MSWINDOWS} if GetQueueStatus(QS_ALLINPUT) <> 0 then {$ENDIF} begin Application.ProcessMessages; end; if application.Terminated then begin break; end; end; end ); TThread.queue (TThread.CurrentThread, procedure () begin NotifyComplete; end); end); FMyThread.FreeOnTerminate:=false; FMyThread.Start; end;
  15. FabDev

    TListView filled by Thread = Freeze

    Thank you Dalija, now it's (seems ?) work fine like this : procedure TForm1.Button2Click(Sender: TObject); begin AniIndicator1.Visible := True; AniIndicator1.Enabled := True; ListView1.enabled:=false; ListView1.beginupdate; FMyThreadTerminated:=false; TThread.queue(TThread.Current, procedure () var I: Integer; Total: Integer; begin Total := 0; for I := 1 to MaxValue do begin TThread.Synchronize (TThread.CurrentThread, procedure () begin ListView1.Items.Add.Text := 'Th: ' + I.ToString; Button2.text:= i.tostring; // On windows this is needed to update AniIndicator {$IFDEF MSWINDOWS} if GetQueueStatus(QS_ALLINPUT) <> 0 then Application.ProcessMessages; {$ENDIF} end); if application.Terminated then begin break; end; end; TThread.Synchronize (TThread.CurrentThread, procedure () begin ListView1.Items.Add.Text := 'Thread: ' + Total.ToString; NotifyComplete; end); end); end;
×