Jump to content

SwiftExpat

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by SwiftExpat

  1. What is the reason for trimming the text, debugging I would usually want to see something like '__'+FText+'__' to make sure I capture the spaces. I agree with filtering, I am currently doing that with TMS FNC object inspector, only at runtime not as a debug visualizer.
  2. SwiftExpat

    What is this IDE feature called?

    I am not sure what the feature is called but for me this got better in Delphi 11 after I eliminated all of my stray class "markers" down in the implementation section. I had renamed some classes but the old names were still there. Make sure those lines are valid, or something does not parse correctly.
  3. SwiftExpat

    Python4Delphi Tutorials/Information

    You might consider focusing your question, do you want to: build an IDE like pyscripter ( source is on git hub for that) use a python module from Delphi use Delphi from python
  4. Fellow Delphi Developers I would like announce version 2022.2.12 of RunTime ToolKit Marshal a component providing runtime inspection for VCL and FMX applications. For the Delphi 27 Anniversary a coupon for 27% off till Feb 27 is available -- Delphi27ANN Marshal provides: Object inspection for forms and datamodules Capture of change details and screenshots Application summary of compile options Data browsing an export for TDataSet descendants Execution of SQL for FireDac Connections Download Caddie as a demo to explore the features or from GitHub Follow along with this video to get an overview of inspection at runtime. Or click through the webstory https://swiftexpat.com/delphi27 Follow this link for price info Take a look at the Wiki here: Thank you for looking and I welcome feedback SwiftExpat https://swiftexpat.com
  5. I missed a field in the setup, you should now see redeem coupon
  6. SwiftExpat

    PC-specific memory corruption...?

    Since it is machine specific, does the application define the connection or use an existing ODBC connection? This could produce different results on different machines. Since you know the 3 columns that cause the query to fail, profile them to check for bad data. Then you can understand what data in the column is getting truncated. SELECT LENGTH( first_name ) len, COUNT( * ) FROM employees GROUP BY LENGTH( first_name ) ORDER BY len;
  7. SwiftExpat

    Reinstalling Delphi 10.4 after PC Crashed

    Another affordable disk image solution is https://www.oo-software.com/en/diskimage-backup-your-data Sign up for the news letter and you can usually get a copy between $10 - $20 USD.
  8. SwiftExpat

    Get Parent process Current directory

    One item you might try is to use TPath to get the full path of a file in your working directory (the file does not need to exist). That would give you the working directory at that time. program CheckWorkDir; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.IOUtils; begin try writeln('Working Dir = ' +TPath.GetDirectoryName(TPath.GetFullPath('pid.txt'))); except on E: Exception do writeln(E.ClassName, ': ', E.Message); end; end. output: c:\Data>C:\Users\Coder\Documents\Embarcadero\Studio\Projects\OSUtils\TouchFile\Win32\Debug\checkworkdir.exe Working Dir = c:\Data\ c:\Data>cd ibd c:\Data\ibd>C:\Users\Coder\Documents\Embarcadero\Studio\Projects\OSUtils\TouchFile\Win32\Debug\checkworkdir.exe Working Dir = c:\Data\ibd
  9. SwiftExpat

    Get Parent process Current directory

    If you are open to using WMI, check out https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-process You can see an example output running this at a command line: wmic process
  10. I played a little more with this, but honestly it is no less code than what you already wrote, basically a recursive loop writing a JSON. This statement form Uwe helped me understand the complexity better. FNC gets the object type using RTTI, so I am not sure it is worth trying to trick / persuade it. StyleAPI is an example of how to seal an API. Since the reference is via an include, I would be tempted to copy it and modify visibility. Zoe, you deserve a thanks for digging through the API and making an export with it.
  11. SwiftExpat

    How to create a grid that looks like this

    David FNC has a "Tool Bar Button" which has some rounded corners. Might be worth a look.
  12. TMS FNC Core has a a library that works with published properties. It is licensed with FNC. TMS blog post describing it here: https://biz.tmssoftware.com/site/blog.asp?post=646 Here is your code forked / converted to work with FNC : https://github.com/SwiftExpat/vsf2json . EXE and a json sample are in the releases so you can try it out if you like. I had to derive a class to include the list of style objects, but not much code to write at all. TExportStyleSource = class(TSeStyleSource) public function GetStyleObjects:TList; published property StyleObjects: TList read GetStyleObjects; end;
  13. SwiftExpat

    Tool to inspect properties at run-time?

    This is correct, you can see sample source code on Github here with compiled demos here. The component is a simple button which is appropriate for starting out. In an established application I take the approach to not use any extra space on the form by utilizing an onclick event handler of a label. The FMX sample shows a click 3 times on a label to invoke, similar to the 7 long presses in Android. This design allows you to ifdef out the code for your release and not modify the form. Note the ifdefs in the samples. This is correct. This code maintains the tree of forms, data modules, components. The Inspector loads the component details but is not automatically aware of changes that occur. On the Inspector tab there is a button that always allows you to reload. In general workflow it stays up to date, but depending on what events are assigned on the component you may need to reload. An example would be modifying the align edit1 from center to client, The Inspector updates the align property because it is aware it made the change. The width still shows 100 as in the Inspector because it is unaware of the new width due to alignment. A click on the reload button will force it to load the current values.
  14. SwiftExpat

    Tool to inspect properties at run-time?

    At runtime my component "Marshal" creates a form dedicated for inspection. This is where you inspect and have access to the components. My offline application "Caddie" captures your actions in Marshal and lets you review them later. This is organized by application and is not connected to the runtime copy. Together they make up the Runtime Toolkit. The challenge I attempt to solve is documenting modifications at runtime so you can ensure the correct changes are made in your source code. I like Marco's original tool, but I found myself not remembering what I modified to fix my issue. I appreciate your features requirement clarification, but at this point I only do component inspection.
  15. SwiftExpat

    Tool to inspect properties at run-time?

    Also worth mentioning from TMS is with the FNC UI pack you get an object inspector. Note in the documentation it calls out that you are inspecting published properties only. TMS FNC Object Inspector does not populate a tree of the application components, it is just the Inspector. https://www.tmssoftware.com/site/tmsfncuipack.asp?s=fncobjectinspector#features To your original question of all classes and objects, it is worth considering visibility and ownership. The component tree is populated based forms / data modules owned by the application, then components owned by the form. Consider if you are creating components at runtime and the owner is assigned to the form, if not then the component will not be visible. I have used it to inspect some of by business objects, with the condition that the property is published. It also has events so that you can make properties read only at runtime. Take a look through the PDF and see if it fits your needs. If you desire a component tree you could build / buy something like my product, I do not include a license to FNC UI pack, it is a separate purchase. Some youtube videos are available at https://swiftexpat.com that will give you an overview.
  16. SwiftExpat

    Caching oddity

    For me this confirms it is cached. I would not waste time in perfmon. I would go with @Kas Ob. and his number 5. I have never read into any of that material but it sounds like a logical boundary that the OS would not allow you to cross.
  17. SwiftExpat

    Caching oddity

    Have you used Task Manager to watch the cache counter in the Memory tab? It is a good place to start before perfmon. While that disk might look local to you, it is likely on some storage array which could have some block caching. Consider how much RAM is on that server to cache with and how busy is that server when you are executing your programs. Perfmon with some counters set around physical disk, % idle time, read queue length, reads per second and is a good place to start to see when it is actually hitting the physical disk and if it is waiting on disk. Compare your reads per second against run 1 an run 2. Also grab the cache counters and look to see if any of them spike on a second run, this will give you an OS cache look.
  18. SwiftExpat

    Enbedded editor, debugging, etc...

    They are not nearly the same functionality, stick with TMS. I think of it like this, PY4D loads python39.dll into Delphi at the api level. At this point you have an execution engine. As a developer you want / need to wrap your Delphi API to make it python friendly / usable. A justification would be to python enable your end users as some sort of marketing selling point. I fear you would be teaching / debugging your end user python which is copy paste from the internet. It is valid large investment if you want to grow out of your application something like this where the Wing IDE is interacting with Blender. Look at this as an example and just imagine the work to get there. https://wingware.com/doc/howtos/blender
  19. SwiftExpat

    Enbedded editor, debugging, etc...

    I do not have a solution for this, but have some thoughts to explore this further: Do you really need the IDE embedded in your application or could you treat it as a remote execution / debug scenario? Which code, Delphi or the Python script, do you need the user to be able to watch / step into? --how deep does the customer really need to watch into your Delphi code, first public level only? Could you use PY4D to host the interpreter and then remote attach to it with the IDE? --this is probably the path to aim for, it may require more wrapping of your Delphi code, but then you have options on the IDE side.
  20. SwiftExpat

    How should I do SysPathInit?

    Another way to solve the problem, when you need to add / modify to path, order is likely important. Just run the command in python: import sys sys.path.insert(0, 'path/to/script') The engine has a property, PythonEngine.InitScript: PythonEngine.InitScript.Add('import sys'); PythonEngine.InitScript.Add('sys.path.insert(0, 'path/to/script')'); The benefit is when you attempt to run / unit test in python and need to modify the path. And if you use PyScripter as your python dev tool the approach will be reusable.
  21. SwiftExpat

    Problem with local resources in RDP Session

    Christian, It sounds a lot like desktop heap limitation, most likely on the terminal server. A summary document to describe the problem is here: https://techcommunity.microsoft.com/t5/ask-the-performance-team/sessions-desktops-and-windows-stations/ba-p/372473 The registry reference is here: https://docs.microsoft.com/en-us/troubleshoot/windows-server/performance/desktop-heap-limitation-out-of-memory the fix is in step 4: In the Value data section of the Edit String dialog box, locate the SharedSection entry, and then increase the second value and the third value for this entry. You can bump those values up 512 at a time and see if it helps. Unfortunately it is a reboot each time. For a more scientific approach, I found this from an MVP. https://thundaxsoftware.blogspot.com/2011/10/monitoring-desktop-heap-memory-and.html
  22. SwiftExpat

    Delphi IDE on AMD cpu?

    I should clarify, ongoing defects considered and compared, Delphi has no more stability problems on my AMD vs Intel laptop. I acknowledge that if the hardware gives me perceived stability, it is likely masking race conditions. My Intel laptop is not likely be more than 10-15% slower in this workload, both are SSD as David points to. Laptops suffer from heat, as soon as the processor gets hot it starts to throttle down. The new desktop has plenty of cooling so it stays at full throttle. Your goal with an AMD build has to be keep it cool to maintain full core speed. So the speed gain is likely staying at full throttle, with a little extra clock speed. If you are looking at a 5600 you should be running more than just Delphi to actually use those 6 cores and the cache you are buying.
  23. SwiftExpat

    Delphi IDE on AMD cpu?

    I have been running 10.4.2 for 2 months on a AMD 5600X with no stability problems. Mine is a desktop build, so cooling is easy to keep under control. The IDE is very responsive, LSP definitely performs better compared to my laptop, Compile time is 20-30% improved. IDE stability is likely linked to the graphics card / driver underneath more than the processor. I did go very low end with an NVIDIA GT 1030 from a good supplier ASUS.
  24. SwiftExpat

    IOS SIMULATOR ON SYDNEY 10.4

    I am running 11.2.3 Big Sur on virtual box, XCode 11.5. The downside is there is little graphics acceleration, so do not expect to test a UI application at real speed. I would recommend 8GB ram for the VM and 4 procs. You can experiment with it from here, results will vary with hardware, just remeber to add the extras in VBOX: https://www.soupbowl.io/2020/04/macos-in-virtualbox/ https://www.wikigain.com/create-macos-big-sur-iso-image/
  25. SwiftExpat

    Problems using embedded python package for Windows

    Hello Rolf, There is a file in the directory with the suffix, should be python35._pth that needs to be modified to import site. Here are the references I used to get past the issue: https://dev.to/fpim/setting-up-python-s-windows-embeddable-distribution-properly-1081 https://www.christhoung.com/2018/07/15/embedded-python-windows/
×