Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SwiftExpat

  1. I did not blanket re-write my handlers. I started from the top down combined with refactoring. From a debugger session point of view, it gives you a place to set a break point. That means you have to set 2 breakpoints.
  2. SwiftExpat

    Disable then Enable a Procedure

    I think what you are looking for is this, declare a var to the type of the event. procedure TfrmRTCaddie.LicenseEditRefresh(const AValid: boolean; AInvalidReason: string); var ne: TNotifyEvent; //variable of event type begin ne := edtLicKeyCode.OnChange; //set the variable to the current onchagne edtLicKeyCode.OnChange := nil; //set on change to nil //work goes here edtLicKeyCode.OnChange := ne; //asign the event hander back to the control event end;
  3. I believe this is what your asking for, something like this, focused on the else clause, adjusted for the faulting module. "You can access the current except value via JSExceptValue in unit JS." "Note that this is only valid inside the catch-block. The compiler will not warn, if you use it outside. " Unit MyModule; Interface Uses SysUtils, Math, JS; Function DoIt(n: integer): double; Implementation Function DoIt(n: integer): double; var E: Exception; Begin try Result:=double(7.0)/n; if not IsFinite(Result) then if n=0 then raise EZeroDivide.Create else raise EOverflow.Create; except on EZeroDivide do Result:=0.0; on E2: EOverflow do Result:=0.0; else raise EAbort.Create('Something other: '+String(JS.JSExceptObject)); end; End; End. Reference : https://wiki.freepascal.org/Pas2js_Transpiler#Translating_try..except
  4. You could try to write the except statement with the else syntax to see if it gets caught. I had to do this in web core, null items will raise an exception that are a special exception. try ... except on E: Exception do Logger.Warn('Failed app tool init : ' + E.Message, self); else // handle everything else Logger.Warn('Failed app tool init', self); end;
  5. SwiftExpat

    Delphi 11.3 is available now!

    Agreed. That process is QP defects, but it is too late in the game. That is not fair to the developer (and should be planned for). As a beta tester I am testing with only a small time allocation, 1-2 hours per week. From my point of view, some focus to the beta cycle should be added to get the most out of beta testers. Establish coverage by dividing up focus groups by feature: Allow me to choose 2-5 features I use in the IDE Assign 1-2 features I use rarely but am familiar with
  6. SwiftExpat

    Jumbo packet use with ICS

    Not related to ICS, but sounds like a problem I had in the past. Disable flowcontrol on the ethernet adapter.
  7. SwiftExpat

    Screenshot on macOS

    I use this, you should be able to adapt for your use. RootComponent is a TForm. Reference: https://www.fmxexpress.com/create-device-scaled-screenshots-in-delphi-xe5-firemonkey-on-android-and-ios/ function TSERTTKRepoForm.ScreenShot: TTMSFNCBitmap; var lms: TMemoryStream; bmp: TBitmap; fScreenScale: Single; Surf: TBitmapSurface; function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin result := 1; if TPlatformServices.Current.SupportsPlatformService(IFMXScreenService, IInterface(ScreenService)) then begin result := ScreenService.GetScreenScale; end; end; begin lms := TMemoryStream.Create; try lms.position := 0; fScreenScale := GetScreenScale; bmp := TBitmap.Create(Round(TForm(RootComponent).Canvas.Width * fScreenScale), Round(TForm(RootComponent).Canvas.Height * fScreenScale)); bmp.Clear(0); if bmp.Canvas.BeginScene then try TForm(RootComponent).PaintTo(bmp.Canvas); finally bmp.Canvas.EndScene; end; Surf := TBitmapSurface.Create; Surf.Assign(bmp); if not TBitmapCodecManager.SaveToStream(lms, Surf, '.png') then raise EBitmapSavingFailed.Create('Error saving Bitmap to png'); Surf.Free; bmp.Free; lms.position := 0; result := TTMSFNCBitmap.CreateFromStream(lms); finally lms.Free; end; end;
  8. SwiftExpat

    Alphabet Index for navigation on ListView?

    TMS has this, should almost fit your needs. https://download.tmssoftware.com/doc/tmsfncuipack/components/ttmsfnctableview/
  9. SwiftExpat

    How to deploy third-party python modules, like Pyvista?

    I think you are missed the pth file, review the steps in this answer and double check: https://stackoverflow.com/a/48906746
  10. SwiftExpat

    Fatal Error F2039 - Could not create output file

    Willi, The behavior is expected if your code is hung, the IDE does not actually clean up the process. I wrote an IDE expert, but it is only for Delphi 10.3, 10.4 & 11. You can create a tool in the IDE to make killing the process simpler, see this thread, page 4 look for taskkill and then set the correct exe name to cleanup your project.
  11. SwiftExpat

    How to deploy third-party python modules, like Pyvista?

    C runtime is only item lacking with py embbeded, install it with pip and copy it to your EXE dir. python -m pip install msvc_runtime Here is what mine looks like on the file system:
  12. SwiftExpat

    How to deploy third-party python modules, like Pyvista?

    I will add a requirement that you want a stable deployment to test against, so that you can certify your software and have a basic support level matrix. I selected python embedded, so I know my python version is 3.9.x. I then PIP installed the modules so the version of each module is known and can be tested to work. I then zip all of that up and deploy it as a sub-directory to my executable. Correct depends on what you believe you can support on the client system.
  13. SwiftExpat

    How to detect if a Dialog is open/running?

    This should get you started, I match mine by classtype. for i := 0 to Screen.FormCount - 1 do // itterate the screens if Screen.Forms[i].ClassType = TSERTTKMarshalForm then begin Screen.Forms[i].Show; if Screen.Forms[i].WindowState = TWindowState.wsMinimized then Screen.Forms[i].WindowState := TWindowState.wsNormal; exit; end;
  14. SwiftExpat

    lxml in TPythonThread with Delphi don´t works

    I think I get you point, would you write it like this? edited above based on feeback
  15. SwiftExpat

    lxml in TPythonThread with Delphi don´t works

    Likely just call CoInitialize CoInitialize(nil); try ... your code here finally CoUninitialize(); end;
  16. SwiftExpat

    TTreeview to JSON VCL?

    Someone had a similar question in the TMS forum recently and I thought the work around was a quick solution. Add columns (the work around was to hide the columns) to the tree view for each piece of data that is in your pointer. When you assign the pointer, copy the strings to the text of the columns. The TMSFNCTreeView in FNC UI Pack is JSON based, you can see if it fits your needs.
  17. This can be frustrating to understand, because technically your code works. The comment above is right on point, your next step in isolating this should really be using SysInternals Process Explorer and use the Environment tab to examine the environment variables. Compare the run from the IDE and from Windows explorer and then you know, based on the difference, what to set and what gets set from the IDE.
  18. Are you running the application from the IDE, either run or debug? Close the IDE and then run your executable, it will likely work.
  19. You arrive at 9:30 to setup and get ready for your presentation at 10:00. You arrange your laptop, get connected and are joined in the room by your business partner at 9:35. You launch the dashboard you are about to present only to notice data is missing in one of the charts ... On Nov 15, 2022 I will be presenting in a live webinar with TMS to show how Marshal can be used to solve some last minute issues with this dashboard and ensure a successful presentation. https://www.tmssoftware.com/site/tmswebacademy.asp?id=145 I am recording previews in parts, here is 1 of 3: Marshal will be used in this webinar to: 1. Modify component properties using the Object Plus inspector 2. Debug an ETL issue using Marshal inspectors for TDataset and Firedac connections 3. Customize an FNC Chart using a custom inspector Marshal, developed using TMS FNC UI Pack, supports VCL and FMX for the Delphi 10.X and 11.#. I will discuss features used from FNC and why I find it is a logical choice. TMS will be on the webinar as well to answer any FNC related questions. The compiled demo apps and source code are available here with a brief explaination about how they are built. https://github.com/SwiftExpat/RunTime-ToolKit/tree/main/Samples/FNCChart Please sign up for the webinar and join us to learn how Marshal can benefit you. I do appreciate feedback either here, GitHub, LinkedIn or email. Thank You, Neil Laskowski
  20. Runtime resources are limited, join us tomorrow to learn about Marshal. See you on Tuesday Nov 15. https://www.tmssoftware.com/site/tmswebacademy.asp?id=145 Preview the content via the videos above to see how this will be a beneficial webinar for you.
  21. Space is still available !! Take a sneak peek at the content with the videos above. See you on Tuesday Nov 15. https://www.tmssoftware.com/site/tmswebacademy.asp?id=145
  22. Just another tool for an age old problem, PowerToys now has an option to find what process is locking a file and option to kill the offender. My source was Ghacks (RSS feed): https://www.ghacks.net/2022/11/03/powertoys-0-64-launches-with-file-locksmith-and-hosts-file-editor/ Official site: https://github.com/microsoft/PowerToys/releases/tag/v0.64.0
  23. RunTime ToolKit Marshal version 2022.11.02 is available. New Features: Custom Inspectors can now be written based on class type. Sample for a TMS FNC Chart here Custom Inspector FNC Chart: https://github.com/SwiftExpat/RunTime-ToolKit/tree/main/Samples/FNCChart App Inspector component(non-visual) automatically starts Marshal and allows to re-open inspectors from last session. Object Plus now allows inspection of sub-components. Behavior change: Component properties that are components now open/switch to an inspector instead of an inline edit. Fixes: Frames correctly nested/expanded in navigation tree. Full release notes: https://swiftexpat.com/marshal/version.html Compiled demo for FMX and VCL here: https://github.com/SwiftExpat/RunTime-ToolKit/releases/tag/2022.11.02 Live webinar on Nov 15, 2022 will demonstrate the new custom inspector, signup here: https://www.tmssoftware.com/site/tmswebacademy.asp?id=145 Choose your level and see Marshal in action: Basic - Object Inspection: https://www.tmssoftware.com/site/blog.asp?post=1005 Intermediate - Data Inspection: https://www.tmssoftware.com/site/blog.asp?post=1008 Advanced - Custom Inspector for FNC Chart: https://www.tmssoftware.com/site/blog.asp?post=1014 Any questions or feedback feel free to: comment on this post send me a message comment on Github comment on YouTube send an email and this list could be longer but should be enough to put a laugh in your day
  24. Sounds like you want RRDTool, at least from a structure / consolidation function perspective. https://oss.oetiker.ch/rrdtool/doc/index.en.html
  25. Visual Impact part 3 of 3 is available in the TMS blog and resumes with the story: Your presentation begins in 8 minutes and the dashboard can be enhanced using data labels on the chart. Marshal custom inspectors allow you to author your own inspector and shown is a custom inspector for a TMS FNC Chart. See the post here:Blog 3 of 3 Visual Impact On Nov 15, 2022 I will be presenting in a live webinar with TMS to show how Marshal can be used to solve some last minute issues with this dashboard and ensure a successful presentation. Register for the webinar: Webinar Registration Video summary: The compiled demo apps and source code are available here with a brief explanation about how they are built. https://github.com/SwiftExpat/RunTime-ToolKit/tree/main/Samples/FNCChart Please sign up for the webinar and join us to explore how Marshal extends your debugging options at runtime. I do appreciate feedback either here, GitHub, LinkedIn or email.
×