Jump to content

pyscripter

Members
  • Content Count

    779
  • Joined

  • Last visited

  • Days Won

    42

Posts posted by pyscripter


  1. On 12/29/2023 at 12:11 PM, delphivi said:

    Hello, Yes, I have read it

    Are you calling SetPythonHome, as suggested in that page?

     
    On 12/29/2023 at 12:11 PM, delphivi said:

    SetExceptionMask(exAllArithmeticExceptions);

    Have you tried 

    MaskFPUExceptions(True)

    instead?

     

    Is the Conda Library\bin subdirectory in the system path?  If not try adding it.


  2. 57 minutes ago, MarkShark said:

    Thanks!  Is using Searchbuf (unfortunately with the $if to fix this issue) ok to use as a solution to the SynEdit search engine issue I've been working on?  Otherwise, we'd need a reverse version of the current "Next" function which looks like it might be a Boyer-Moore implementation?

    Please open an issue and describe the problem.  Using SearchBuf should be OK.


  3. Features missing in the Delphi editor:

    • Proper Unicode handling 150265824-cbf6652a-bbbc-457c-9498-5f09f9b60423.png150266107-fdccabd2-c766-4ec3-a674-13abdf91e63b.png.fca55cb41c3776b50917149cf3ff988d.png.  It does not even support combining characters.
    • Multi-cursor/selection editing 
    • Modification (track changes) bar that works with undo.
    • Accessibility support
    • Drag & drop editing
    • triple and quadruple click support
    • double/triple click and drag support
    • Enhanced scroll bar as in VS Code
    • ...
    • Like 2

  4. Here is a lock-free implementation for your FHIROperationFactory function.

    var
      SingletonFHIROperationFactory : IFHIROperationFactory
    
    function FHIROperationFactory: IFHIROperationFactory;
    var
      LFHIROperationFactory: IFHIROperationFactory;
    begin
      if SingletonFHIROperationFactory = nil then
      begin
        LFHIROperationFactory :=  TFHIROperationFactory.Create;
        if InterlockedCompareExchangePointer(Pointer(SingletonFHIROperationFactory),
          Pointer(LFHIROperationFactory), nil) = nil
        then
          SingletonFHIROperationFactory._AddRef;
      end;
      Result := SingletonFHIROperationFactory;
    end;

    Delphi does something similar in some places.


  5. The Embarcadero fork of P4D, is often ahead of the PyScripter repo, but it is currently behind.   Its main focus is the generation of the delphivcl and delphifmx  extension modules as well as Android support.  The two repos are synced regularly.  I am only responsible for the pyscripter P4D home repo.   In most cases it does not matter which one you use.


  6. Not too bad an idea.  For instance this appears to run OK.

     

    import threading
    import time
    from delphivcl import *
    
    class DesktopView(Form):
    
        def __init__(self, owner):
            self.SetProps(Caption = "Welcome")
            # create and set update timer
            self.tmrUpdate = Timer(self)
            self.tmrUpdate.Enabled = False
            self.tmrUpdate.Interval = 1
            self.tmrUpdate.OnTimer = self.__on_timer_update
            self.tmrUpdate.Enabled = True
    
        def __on_timer_update(self, sender):
            time.sleep(1)
    
    def app_main():
        # initializes GUI Application
        Application.Initialize()
        Application.Title = "OPC UA Client Demo"
        # creates main application form
        app = DesktopView(Application)
        app.Show()
        FreeConsole()
    
        # enters in vcl main loop
        Application.Run()
        Application.Free()
    
    def inthread():
        for i in range(20):
            print(i)
            time.sleep(1)
    
    if __name__ == "__main__":
        threading.Thread(target=inthread).start()
        threading.Thread(target=app_main).start()

    You could run the asyncio in a thread as in python - Running asyncio loop and tkinter gui - Stack Overflow.

    Also please submit an issue to the delphivcl project to expose the Application.OnIdle event.   That would make the use of timer unnecessary.

    • Like 1

  7. On 11/8/2023 at 7:28 PM, Uwe Raabe said:

    Indeed, for me the biggest enhancement is the handling of font sizes regarding dpi changes.

    Like most new features and bug fixes, this introduces new bugs:

    https://quality.embarcadero.com/browse/RSP-43261

    https://quality.embarcadero.com/browse/RSP-43263

     

    Update  I found a third even more serious issue related to the changes introduced for font scaling:

    https://quality.embarcadero.com/browse/RSP-43270

    • Like 1

  8. 2 hours ago, Uwe Raabe said:

    Indeed, for me the biggest enhancement is the handling of font sizes regarding dpi changes. This eliminates a plethora of workarounds

    The problem is that if you maintain open source components that support many versions of Delphi, this does not eliminate anything.  It just adds another IFDEF in the code.  Having said that, it is good to see it fixed.

    • Like 2

  9. 1 hour ago, Uwe Raabe said:

    Besides that, there are currently 15 issues I reported in Quality Portal marked fixed in this release.

    @Uwe RaabeUnfortunately though, your [RSP-35301] Option to design in Screen PPI but save in 96 PPI - Embarcadero Technologies is not, despite the many votes it got.  And by the way thanks for your article.  Highly recommended.

     

    Three of my reported issues were fixed and one more is wrongly marked as fixed (https://quality.embarcadero.com/browse/RSP-31137).  But I have to agree with @David Heffernan that the list of new features is rather underwhelming, if you are  not using C++ Builder.  David what do you think of the change related to floating point exceptions? 


  10. 2 hours ago, mbaghb said:

    The point that I noticed is the large size of the DLL file,

    I have no idea why and how you are building a DLL, but from the size I can  tell that you are pulling in a large chank of the Delphi RTL.

     

    2 hours ago, mbaghb said:

    And another point, is there a complete document of all functions, methods, etc. for P4D that I can download?

    Not except the source code.

    • Like 1
×