Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SwiftExpat

  1. SwiftExpat

    Font selection for coding

    Here is an article that introduces font selection for coding. It is the most up to date that I have seen in a while so I hope it to be of use to others. Which open-source monospaced font is best for coding? | by Matej Latin | UX Collective (uxdesign.cc)
  2. If this is the message window you are expecting, it is from Deputy available in GetIt.
  3. SwiftExpat

    Optimization On or Off ?

    My guess would be ASLR, see discussion in this thread:
  4. SwiftExpat

    Modify bitmap of FMX Image object

    Looks like TCanvas.BeginScene / EndScene is missing from the code.
  5. For anyone who struggles with py embeddable in the future, here are some working executables for you to troubleshoot with. Validate your python embeddable setup, confirm package installation and test your imports. FMX and VCL X64 compiled executables in the releases : Source code & sample "_pth" file is available in the GitHub Repo : https://github.com/SwiftExpat/ValidatePythonEmbeddable Usage: Click on browse DLL , this will set the dllname and path correctly and then allow you to adjust other component properties. Then load DLL PIP List Pip results can be confusing, so I have automated the PIP list command to ensure it runs from the embeddedable dist. More should be done for this, but this is a start and feel free to fork the repository or make suggestions.
  6. In Delphi 11.3 I am curious if anyone else has seen this behavior. I can not reproduce this yet, but it has happened several times and I am curious if anyone else has seen this. I will likely rebuild this project group to see if it resolves. Symptoms / Cause of error I have open a project group with ~20 projects in the list. I am debugging projectA I am looking at the source and the IDE prompts for recompile recompile happens but random projectB executes ( I had not debugged or compiled this program in days ) no projects are active in the project group Activate projectA and everything works fine again.
  7. No build events, but good suggestion. I built a new project group so I am testing.
  8. SwiftExpat

    Anything in a TMemoryStream??

    TMemoryStream has a size property which is size in bytes, just check to see that it is greater than zero or some minimum size that you find acceptable.
  9. You answering a question with something from left field does not help others in the future, it just gives us more comments to try and filter through. So did you just reply so that you can increase the number of posts on your profile?
  10. Autorecover is the only thing on, is there a QP report that makes you suspect that setting?
  11. Profiling that code is necessary to figure out which component is taking the time, as Brian Evans said above. I use one component which takes 23 ms to execute the create. That is a long time considering there are 5 instances on the form. My fix was to delay creation of the 4 instances not visible.
  12. Glad to see you sticking with it and it sounds like you are close. I spent a long time on this but having it stable pays off in the end. Something simple like this is what I use, so just change python to 3.11 TPath.Combine(TPath.GetDirectoryName(paramstr(0)), 'python'); Pip should resolve packages in your embedded dist, this is why you use the package with the -m option. If it does not the dist is not importing site correctly and you are going to chase errors. Here is my working, by changing to the directory it will use the python binary from that folder first, so double check with the double -V. After that the concern is the location of the package, it should show in your embedded. C:\Users\Coder\AppData\Local\Programs\RunTime_ToolKit\python>python -V -V Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] C:\Users\Coder\AppData\Local\Programs\RunTime_ToolKit\python>python -m pip list -v Package Version Location Installer --------------------- ----------- ------------------------------------------------------------------------------ --------- astroid 2.5 c:\users\coder\appdata\roaming\python\python39\site-packages pip bcrypt 3.2.0 c:\users\coder\appdata\local\programs\runtime_toolkit\python\lib\site-packages pip Now for the pth file, it should look like this: python39.zip . .\Scripts .\Lib .\Lib\site-packages # Uncomment to run site.main() automatically import site The last piece you will need is msvc runtime, python does not require it but likely a module you use will python -m pip install msvc_runtime Now you are not done yet, because Delphi wants to load that DLL from the same directory as your exe. So as part of your install just copy the dlls from python over to your exe dir. I did this for the same question a while back, so here it is as reference:
  13. This covers how to set it up, after that you can run pip against your embedded dist. Note, path is important and likely why you got the same results. https://dev.to/fpim/setting-up-python-s-windows-embeddable-distribution-properly-1081 Read through this one as well,
  14. I used pip to install them into my embedded dist, that will check for any dependencies. python -m pip install numpy python -m pip install opencv-contrib-python You should be able to diff using --List modules in embedded python -m pip list -v --list modules from other distribution pip list -v
  15. Version control that file and commit often. Then you can merge the changes or just go back to the old version of the dfm. At least this will save the pain of resetting those connections. I do not experience the problem.
  16. SwiftExpat

    Class "abcdef" not found. error??

    One of the components is likely just missing an initialization section initialization registerclass(TComponent); You could try to put it at the end of the Form and see if it will load. Just replace TComponent with the name that is failing to load.
  17. Application lifecycle and updates should drive the decision, not disk space. Write out a timeline of 3-4 update cycles for your applications and determine if you want them to both depend on the same python embedded. Can you manage that inter-dependency through the update cycle? How it looks on the target machine is a question for your customer. As long as you are not modifying the machine path the answer is likely that they will not care. If the products mature, you can always consolidate them later.
  18. April 4 @ 3pm UCT I will be demonstrating how Marshal can be used to debug components at runtime. This release includes support for TMS WebCore. Signup here : https://www.tmssoftware.com/site/tmswebacademy.asp?id=150 Get hands on experience using the Web Core demo here: https://swiftexpat.github.io/RunTime-ToolKit/MarshalDemo_Web/MarshalDemo.html Product page & purchase info: https://swiftexpat.com/
  19. SwiftExpat

    Anyone know why?

    I mean it with all respect, it is not a bad thing to be a grey beard.
  20. SwiftExpat

    Anyone know why?

    Honestly, the folks over at gateway are very up front about the job, they want a developer who can travel onsite to do installs. And they are up front! Now for the more experienced developer, you might consider this 🙂 from linkedin. These folks are looking for grey beard on a minimal salary. .......................... Role: Delphi Developer Location : Frederick, MD (Remote) Duration: Long Term Remote – OK but Associate must be in EST zone Job Description: Looking For 6+yrs Delphi Developer with Below Skills. Qualifications: Should have 10-12 years of strong experience in Software Development in Delphi. Should be an expert in Delphi development and Technical Analysis Documentation. Ability to effectively resolve performance/memory leak/scalability issues. Develops, enhances and maintains Pension and Retirement applications using Delphi, Cobol, MS SQL and Btrieve files. Excellent understanding of any RDBMS like Oracle or SQL Server. Strong results orientation, excellent verbal and written communication skills. Should be capable of handling product versions, documentation and development standards. Participates in the analysis and design of the client's system applications. Ability to understand code in Delphi 7 and convert to 64-Bit Delphi XE8. Good technical, analytical and communication skills. Strong expertise in application development using Delphi, Interbase and SQL Server. Strong knowledge of COM, ODBC, OOPS concepts and XML. Sound experience on developing Client Server applications and libraries. Expertise on PLSQL, RDBMS concepts and development using relational databases. Roles and Responsibilities : Responsible for developing software solutions which are technically and architecturally sound in principle. Adherence to commitments delivery timelines and development guidelines. Run and monitor software performance tests on new and existing programs for the purposes of correcting errors, determining areas of improvement and general debugging. -- Thanks & Regards Anand Raj | Lead - Talent Acquisition (US Division) Teamware Solutions Inc |2838 E. Long Lake Road,Suite# 210, TROY, MI 48085 😧 | provided by Dice
  21. I had to contact support, and the turn around was 1 day. In license manager you are looking for an entry "DelphiLSP".
  22. Think of it as embedded = portable ( no need to install, just make the binaries available ). Remember as well you are loading python into Delphi which does not have c runtime. C runtime might be required by some python modules. python -m pip install msvc_runtime This is the layout I use and it works correctly. My python install procedure copies c runtime to the EXE folder so that it loads it on the path.
  23. You should also set DllPath so that it can find the DLL. DllPath :='\some\path';
  24. SwiftExpat

    Assign an event at run time??

    Similar topic last week, short so its worth a review Declare your own procedures to handle the event, here there is one for NewTicket and OldTicket: See the notes in the Datamodule create procedure for if you want to handle it via compiler defines or switch based on some app value using an if statement. interface uses System.SysUtils, System.Classes, Data.DB, Datasnap.DBClient, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, FireDAC.Comp.DataSet, FireDAC.Comp.Client; type TdmMarshalDemo = class(TDataModule) cdsFeatures: TClientDataSet; cdsFeaturesFeatureName: TStringField; fdMemTblVideos: TFDMemTable; fdMemTblVideosVideoID: TStringField; fdMemTblVideosTitle: TStringField; fdMemTblVideosDescription: TStringField; dsVideos: TDataSource; procedure DataModuleCreate(Sender: TObject); private procedure dsNewTicketDataChange(Sender: TObject; Field: TField); procedure dsOldTicketDataChange(Sender: TObject; Field: TField); public function CurrentVideo: TDemoVideo; end; var dmMarshalDemo: TdmMarshalDemo; implementation {%CLASSGROUP 'FMX.Controls.TControl'} {$R *.dfm} { TdmMarshalDemo } procedure TdmMarshalDemo.DataModuleCreate(Sender: TObject); begin //compiler defines {$IFDEF RELEASE} dsVideos.OnDataChange := dsNewTicketDataChange; {$ELSE} dsVideos.OnDataChange := dsOldTicketDataChange; {$ENDIF} //app logic if 1 = 1 then dsVideos.OnDataChange := dsNewTicketDataChange else dsVideos.OnDataChange := dsOldTicketDataChange; end; procedure TdmMarshalDemo.dsNewTicketDataChange(Sender: TObject; Field: TField); begin end; procedure TdmMarshalDemo.dsOldTicketDataChange(Sender: TObject; Field: TField); begin end; end.
  25. SwiftExpat

    How to get CV2 working

    Call this code before you call LoadDLL MaskFPUExceptions(true);
×