Jump to content

shineworld

Members
  • Content Count

    336
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by shineworld

  1. shineworld

    2 seperate installs of Indy in the one IDE?

    I've missed saying that you also have to "disable" temporary the native Delphi Indy10 in the Browsing path: I simply added a '_' char so it is fast to re-enable it with normal projects.
  2. shineworld

    2 seperate installs of Indy in the one IDE?

    I'm used to using a different Indy version in some programs. I've left the official Indy of Delphi installation and I don't touch it. In a project I add a sources\Indyxx path with the desired Indy version source code. Usually this is a modified version of the current GitHub because I need to manage some base mechanism to adapt it to my embedded devices. In the program options I added this path to Search Path: Obviously I don't use IDE to place Indy components onto form but I've to create them programmatically. At now building exe Delphi uses .\sources\Indy10 version file instead of Delphi native Indy.
  3. shineworld

    VTK in DelphiVCL or DelphiFMX

    Perhaps the solution is to watch what VTK do with tkinter to implement the vtkTkRenderWindowInteractor. I will study and try to do a close thing with a compatible DelphiVCL Windows based component. https://github.com/Kitware/VTK/blob/master/Wrapping/Python/vtkmodules/tk/vtkTkRenderWindowInteractor.py
  4. shineworld

    VTK in DelphiVCL or DelphiFMX

    Yes, maybe I explained myself wrongly. I am using Python + VTK + QT. VTK is a very good Python library for working with 3D scenes. QT is terrible for me and I love DelphiVCL e DelphiFMX UI for Python. Unfortunately, to do the rest of the interface, I had to switch from Python4Delphi (DelphiVCL or DelphiFMX) to QT precisely because there is a lack of coverage to OpenGL in them, and however, found no way to integrate VTK to DelphiVCL/DelphiFM. So I was asking if anyone had already done this or could point me to how to create a VTK component that would appear in an area of a Python DelphiVCL TForm, as in the example in the picture below.
  5. shineworld

    What new features would you like to see in Delphi 13?

    1. Sorry for mistakes in post, I never studied English. 2. I use GExpert, and I've to thank the project manager, but I would like to have a better grep in the native IDE. 3. Usually mine are very big project subdivided in many customized versions managed as project group with shared sources. To manage manually the versions info for single project is an hard work which requires jumps as like as a monkey in the three. DDExpert does something to simplify. 4. OpenGL and 2D mix is not so unusual in industry automation related projects, where Delphi, at least in Italy, is yet used also by big firms. I k know FMX, but it's not a level of VCL for many reasons, at least in my cases. Some samples on how VCL + OpenGL can live and be happy: https://youtu.be/3IC15XM_8ow?si=RLuDHZmpU9PgdFj7 And as VCL + OpenGL + Python are a good team: https://youtu.be/ehyZanI54c8?si=dCV6nZd3kbLHa2K4
  6. shineworld

    What new features would you like to see in Delphi 13?

    For me: arm64 compiler for Linux a better refractory tool (often fails also with 100% compilable project) that can work also at a project group level. grep as like as available in GExperts sort lines as like as available in GExpers set version info (to fastly manage version info in a group of projects) as like as in DDevExtension an Embarcadero-managed OpenGL / Vulkan library, like GLScene, for VCL. a more simple way to create ActiveX (to migrate Delphi-made visual components to other platforms).
  7. shineworld

    What new features would you like to see in Delphi 13?

    When you have collected all the ideas, it would be interesting to add a pool where everyone gives one or more preferences. Just to understand what is really needed.
  8. shineworld

    A native VCL, and not Windows-based, TComboBox control.

    Interesting solution.
  9. shineworld

    A native VCL, and not Windows-based, TComboBox control.

    I've used a TComboBox set as List because arguments start from None, 1, 2 .. 256 and use can fastly move to any using key: However, I guess I to move them to the Edit field and check the entered data as suggested. In the past I've used old SweedControls combobox made by zero with Delphi code but moving to 64bit the old and not supported library does not work fine.
  10. shineworld

    The GetIt server is back online - With the 12.0 Patch 1

    Me to. Updated to 1st of most (I hope) patches 🙂
  11. shineworld

    RemoteApp

    For the Remote Support, you can choose a lot of tools (AnyDesk, Teamviewer, Supremo, etc.). In recent times a new actor has entered the scene: RustDesk. RustDesk is an open-source project made with Rust. RustDesk covers either client or server. So you can use default open servers or if you have an external server you can place your RusDesk server in your net service. https://github.com/rustdesk/rustdesk I'm used to placing some of them in my software (some customized with annual payment, and rust desk as an open system): End-users can so choose what remote support service prefer to use (and what does not have connection issues at that time).
  12. shineworld

    Athens Skia TSkPaintBox error in compile

    Hi all. I'm trying to use Skia TSkPaintBox on Athens VCL application. I've enabled Skia in the project. I can use TSkLabel. I can place a TSkPaintBox. And run... But if I try to create the TSkPaintBox Draw event I get this error: [dcc64 Error] Unit1.pas(13): E2003 Undeclared identifier: 'TRectF' [dcc64 Error] Unit1.pas(27): E2005 'TRectF' is not a type identifier [dcc64 Fatal Error] Project1.dpr(5): F2063 Could not compile used unit 'Unit1.pas' Thank you in advance for your answers. Best regards Silverio
  13. shineworld

    Opensource scripting language?

    I don't know if support Unicode (I guess) but I've used it in past years and was very simple to use: https://www.remobjects.com/ps.aspx
  14. shineworld

    TCP/IP Server with OpenSSL TLS 1.2

    After finishing and testing the configuration to have TLS 1.2 on TIdFTPServer I was asked to add OpenSSL and TLS 1.2 also on the API server (based on TIdTCPServer TCP/IP communication). Unfortunately when I set Active to True, and IdSSLOpenSSL.InitContext is called, in the CiperList settings step it always returns error = 1 and I don't understand what I am doing wrong: if StatusInfoOn then begin SSL_CTX_set_info_callback(fContext, InfoCallback); end; //if_SSL_CTX_set_tmp_rsa_callback(hSSLContext, @RSACallback); if fCipherList <> '' then begin {Do not Localize} error := SSL_CTX_set_cipher_list(fContext, {$IFDEF USE_MARSHALLED_PTRS} M.AsAnsi(fCipherList).ToPointer {$ELSE} PAnsiChar( {$IFDEF STRING_IS_ANSI} fCipherList {$ELSE} AnsiString(fCipherList) // explicit cast to Ansi {$ENDIF} ) {$ENDIF} ); end else begin // RLebeau: don't override OpenSSL's default. As OpenSSL evolves, the // SSL_DEFAULT_CIPHER_LIST constant defined in the C/C++ SDK may change, // while Indy's define of it might take some time to catch up. We don't // want users using an older default with newer DLLs... (* error := SSL_CTX_set_cipher_list(fContext, {$IFDEF USE_MARSHALLED_PTRS} M.AsAnsi(SSL_DEFAULT_CIPHER_LIST).ToPointer {$ELSE} SSL_DEFAULT_CIPHER_LIST {$ENDIF} ); *) error := 1; end; Server code: https://pastebin.com/z82zhGyQ I am using the latest Indy sources from the git repository. I thank you in advance for any suggestions Best Regards Silverio
  15. shineworld

    TCP/IP Server with OpenSSL TLS 1.2

    Appreciated exemplify. I need to start using Gist too.
  16. shineworld

    TCP/IP Server with OpenSSL TLS 1.2

    OK! Some forums do not permit, by forum rules, to attach external code links. Next will use Pastebin.
  17. shineworld

    TCP/IP Server with OpenSSL TLS 1.2

    I've missed to set PassTrough 🙂 error = 1 stay for OK, another my misunderstanding. https://pastebin.com/f9sEw2eY
  18. shineworld

    Delphi 12 is available

    In Industry is very hard to think to use C# or Java which are so simple to decompilate and back to source code.
  19. Hi all. For someone could be a silly question but important for me. Today I've purchased Athens, and usually I work with Sydney. I have a lot of very big projects made with Sydney and moving them to Athens will be a long path ( a lot of 3rd parties libraries to install). Can I install Athens on the same PC where Sydney works ? If YES, are there some types of attention to be kept? At the moment I've also Code Gear RAD Studio 2007 for very old projects not ported to Sydney which live without problems with Sydney.
  20. shineworld

    RAD Studio 10.4.2 crashes upon exit

    My 2 cents. I have been battling, or rather, living with the constant crashing of the Delphi Sydney 10.4.1 IDE for months and months. All I had to do was open the IDE and close it to get the protected memory access error rtl270.bpl I tried uninstalling all plugins (GExpert, Parnassus, etc). No luck. Following your directions I removed the installed libraries one by one and, as Murphy teaches, when I removed the penultimate one the problem disappeared. Basically I was using an old, but not much, library called Graphics32 which in the IDE shutdown phase was sending everything into a tailspin. Updated to the latest version now everything works perfectly.
  21. shineworld

    DelphiVCL and asyncio

    Hi all, it is possible to use the asyncio with a DelphiVCL ui-based program? I've implemented an asyncua Client to get data from an OPC UA Server. Here is a simple program that prints some values collected from an OPC UA server. """CNC OPC UA Client.""" #------------------------------------------------------------------------------- # Name: cnc_opcua_client # # Purpose: CNC OPC UA Client # # Note Checked with Python 3.11.3 # # Coding Style https://www.python.org/dev/peps/pep-0008/ #------------------------------------------------------------------------------- import time import asyncio import logging from asyncua import Client # == opc ua client settings == OPC_UA_SERVER_URL = "opc.tcp://localhost:4840/" OPC_UA_SERVER_URI = "https://www.someone.com/opc-ua/server" OPC_UA_ASYNC_SLEEP_TIME = 0.01 # == deveopment settings == DEBUG_LEVEL = logging.CRITICAL # avoid any log not critical DEBUG_ENABLED = False # creates a logger logger = logging.getLogger(__name__) async def main(): """Main entry point.""" # creats opc ua client in with-exception-handled block async with Client(url=OPC_UA_SERVER_URL) as client: # gets namespace index idx = await client.get_namespace_index(OPC_UA_SERVER_URI) # gets program position node program_position_node = client.get_node("ns=2;s=CNC.ProgramPosition") # server updating loop while True: # does nothing, just process relax await asyncio.sleep(OPC_UA_ASYNC_SLEEP_TIME) # reads and prints program positions value = await program_position_node.read_value() print('X:{:10.3f}, Y:{:10.3f}, Z:{:10.3f}'. format(value[0], value[1], value[2])) # checks if this module is running as the main program if __name__ == "__main__": logging.basicConfig(level=DEBUG_LEVEL) asyncio.run(main(), debug=DEBUG_ENABLED) Getting: *** Remote Interpreter Reinitialized *** X: 51.206, Y: 0.000, Z: 0.000 X: 51.206, Y: 0.000, Z: 0.000 X: 51.206, Y: 0.000, Z: 0.000 X: 51.206, Y: 0.000, Z: 0.000 At this point I would like to create a fashioned UI using DelphiVCL, but I'm unable to understand where to place the asyncio.run(main(), debug=DEBUG_ENABLED) because to get DelphiVCL UI the main loop is already done by Application.Run() call: # 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() # frees main application form app.Destroy() Thanks in advance for any suggestion. Best Regards Silverio
  22. shineworld

    DelphiVCL and asyncio

    In the first experiment, I tried to attach a method to the Application.OnIdle but, visible onto dir(Application) Python notice that is not published. What is the right python4delphi repo from https://github.com/Embarcadero/python4delphi and https://github.com/pyscripter/python4delphi ? Sincerely I don't know what to prefer and there are enought of differences between them.
  23. shineworld

    DelphiVCL and asyncio

    A silly solution was to place DelphiVCL in a thread, but I don't know if it is the better way... Code presents a lot of global values, is just a test in waiting for a better idea from Python/DelphiVCL gurus 🙂 import time import asyncio import logging import threading from asyncua import Client from delphivcl import * # == opc ua client settings == OPC_UA_SERVER_URL = "opc.tcp://localhost:4840/" OPC_UA_SERVER_URI = "https://someone.com/opc-ua/server" OPC_UA_ASYNC_SLEEP_TIME = 0.01 # == deveopment settings == DEBUG_LEVEL = logging.CRITICAL # avoid any log not critical DEBUG_ENABLED = False # creates a logger logger = logging.getLogger(__name__) app = None opcua_main_exit = False program_position = [] async def opcua_main(form): global opcua_main_exit global program_position async with Client(url=OPC_UA_SERVER_URL) as client: # gets namespace index idx = await client.get_namespace_index(OPC_UA_SERVER_URI) # gets program position node program_position_node = client.get_node("ns=2;s=CNC.ProgramPosition") while not opcua_main_exit: await asyncio.sleep(OPC_UA_ASYNC_SLEEP_TIME) # reads program positions value = await program_position_node.read_value() program_position = list(value) class DesktopView(Form): def __init__(self, owner): self.SetProps(Caption = "Welcome") # creates labels for program position axes values self.label_x = Label(self) self.label_x.SetProps(Parent=self, Top=40, Left=20) self.label_x.Caption = 'Z : {:15.3f}'.format(0.0) self.label_y = Label(self) self.label_y.SetProps(Parent=self, Top=60, Left=20) self.label_y.Caption = 'Y : {:15.3f}'.format(0.0) self.label_z = Label(self) self.label_z.SetProps(Parent=self, Top=80, Left=20) self.label_z.Caption = 'X : {:15.3f}'.format(0.0) # 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): global program_position if len(program_position) == 6: self.label_x.Caption = str(program_position[0]) self.label_y.Caption = str(program_position[1]) self.label_z.Caption = str(program_position[2]) 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() global opcua_main_exit opcua_main_exit = True # frees main application form app.Destroy() if __name__ == "__main__": app_thread = threading.Thread(target=app_main) app_thread.start() logging.basicConfig(level=DEBUG_LEVEL) asyncio.run(opcua_main(app))
  24. shineworld

    True thread parallelism with P4D and Python 12

    This was my case, in which the main UI and image analysis, with OpenCV, was managed with Python + DelphiVCL, and faster IP Camera commands and frames receiving were managed by a Delphi P4D, in this case, D4P, module using native Threads of Delphi. The attempt to manage frame acquisition via socket with python threads failed miserably. The combo was winning !!! I the future of Python I will be happy to have more power on threads and cores.
  25. I am slightly confused about which repository of python4delphi is most correct to use to integrate Python into my Delphi applications. To date, I know of two repositories on which constant work is visible: - https://github.com/pyscripter/python4delphi - https://github.com/Embarcadero/python4delphi Comparing them it seems that they are managed by different people, but both make fixes and new features with quite a lot of activity, so they are both "alive." Does anyone know how this is organized and which one is preferable to use? Thanks in advance for the answers.
×