Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by FranzB

  1. FranzB

    Jupyter Notebook with P4D

    can I start Jupyter Notebooks using P4D components ? P4D is installed, can this be done with Delphi code or / and python code what I need a) check if notebook is available on my computer c) start a new notebook regarding a) pip install notebook regarding b) jupyter notebook
  2. we will execute the opposite of the instructions given here http://docwiki.embarcadero.com/RADStudio/Sydney/en/LiveBindings_in_RAD_Studio , create a livebindings application , show a query in a stringgrid, without using the live bindings designer my code goes like this , the issue : the code compiles, I guess open query also is functional but the stringgrid remains empty var BindSourceDB1: TBindSourceDB; LinkGridToDataSourceBindSourceDB1: TLinkGridToDataSource; begin aServername := edt_Servername.Text; adatabasename := edt_databasename.Text; ConnecttoDatabase(aServername, adatabasename, aConnection); // a subfunction aQuery.SQL.Text := 'select * from MyTable '; aQuery.Open; // guess fine, because on a VCL application the data are displayed BindSourceDB1 := TBindSourceDB.Create(Self); BindSourceDB1.DataSet := aQuery; LinkGridToDataSourceBindSourceDB1 := TLinkGridToDataSource.Create(Self); LinkGridToDataSourceBindSourceDB1.DataSource := BindSourceDB1; LinkGridToDataSourceBindSourceDB1.GridControl := strngrd_Objecttable; end;
  3. I want to compile one project with 2 totally different compiler settings/options , one version goes to the VCL - the other to the FMX framework etc... What is the role of project file and optset file? Unit scope names are only defined in the project file , but I need to exchange it using the optset file while compiling for the other framework.
  4. would like to understand the difference in the uses statement between uses System.Types; vs. uses Types; After a long time I need to recompile an application which has already been successfully compiled for the LINUX OS. Today the compiler claims I need to change from Types only to system.Types . This is basically not a big deal but I want to understand why this happened. my unit scope names are definded as : FMX;Winapi;System;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win
  5. FranzB

    difference .optset and .dproj file

    we use a JENKINS build server , JENKINS works with Delphi via MSBuild option (I guess .... ) . As a software developer in my case , I must supply path to project , projectfile (*.dproj) and .optset file for generation of or executeables. My first idea fails to create two separate *.optset files for VCL and FMX framework as the supply for the unit scope names via different *.optset files is not working FXM : FMX;Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;System;Xml;Data;Datasnap;Web;Soap VCL : VCL;Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;System;Xml;Data;Datasnap;Web;Soap the source code of my dll is here mydllproject.dpr ( as for all of us 🙂 ) . I don't want to create 2 different source code versions with the identical source code , just to have different *.dpr *.dproj and *.optset files
  6. FranzB

    difference .optset and .dproj file

    the project is an DLL. Yes can save the project file twice like mywork.FMX and mywork.VCL . But this requires each time I update a single line code in one version, I need to manually also update the second one . Not a desired solution path
  7. I failed to installed latest version of python4delphi components, how to fix missing path information Python$(Auto), any help welcome Checking project dependencies... Compiling Python.dproj (Debug, Win32) dcc32 command line for "Python.dpk" ...... Can't load package Python$(Auto).bpl. The system cannot find the file specified [Fatal Error] Can't load package Python$(Auto).bpl. The system cannot find the file specified
  8. FranzB

    Utility to import/convert simple Python code

    Delphi Community edition is free, just download latest DELPHI 🙂 https://www.embarcadero.com/products/delphi/starter/free-download?aldSet=en-GB
  9. which unit contains the TArray class , I*m using Delphi 10.4 not working units : System.Generics.Collections.TArray, System.TArray,
  10. thanks, the issue is now solved ... did too much coding in JAVA as well 🙂
  11. I want to compile this test code below for regular expressions, but none uses option works for me ... error [dcc32 Fatal Error] ..... .pas(10): F2613 Unit 'System.Generics.Collections.TArray' not found. uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Memo.Types, FMX.StdCtrls, FMX.ScrollBox, FMX.Memo, FMX.Controls.Presentation, FMX.Edit, // System.Generics.Collections.TArray, // System.TArray, System.RegularExpressions;; ..... procedure TForm2.Button_evalregexpressionsClick(Sender: TObject); var regex: string; analysistxt: string; list: TArray<string>; item: String; begin regex := Edit_regexp.Text; analysistxt := Edit_analysisText.Text; list := TRegEx.Split(analysistxt, regex); for item in list do begin ShowMessage(item); end; end; end.
  12. I need to extract a word from a text file, the word is defined like MyWord ( ......... . ); MyWord( .....) MyWord ; MyWord; Can I extract MyWord with one regex expression or do I need 2 spilt lines of code and compare ? list := TRegEx.Split(Input_Text, '(' );
  13. MyWord is the string i want to extract, in the brackets come a list of numbers or strings LongList ( 1,2,3,4,5) Towns ( Paris, London, NY, Berlin) later I also need to extract the text between the brackets and need to port this code to delphi txt = "Town (my) simple test"; reg = /((.*))/; Ausgabe = txt.match(reg);
  14. I use this code below to read an integer value from an database aObject.IntValue := Fieldbyname('IntegerField').AsInteger; my code is functional, if there is an integer value stored. Reading an " " empty field I get an exception failure. What is the best coding style to avoid this error in an application ?
  15. Delphin 10.4 does not compile this code , but to my understanding this is a correct set of parameters calling MessageDialog FMX version TDialogService.MessageDialog('You want to ........ ', TMsgDlgType.mtConfirmation, TMsgDlgBtn.mbYes, TMsgDlgBtn.mbNo, nil, procedure(const aResult: TModalResult) begin if (aResult = mrYes) then begin // Write code here for pressing button OK ...... Label_Statusbar.Text := ' -> done '; end else begin // Write code here for pressing button NO ...... Label_Statusbar.Text := ' -> canceled '; end; end ); end;
  16. FranzB

    FMX : TDialogService.MessageDialog wrong parameter ?

    still no luck, compiling this code .... TDialogService.MessageDialog('You want to ........ ', TMsgDlgType.mtConfirmation, mbYesNo, TMsgDlgBtn.mbNo, nil, procedure(const aResult: TModalResult) begin if (aResult = mrYes) then begin // Write code here for pressing button OK // ...... Label_Statusbar.Text := ' -> done '; end else begin // Write code here for pressing button NO // ...... Label_Statusbar.Text := ' -> canceled '; end; end );
  17. I changed from Delphi 10.3. to Delphi 10.4 and want to compile functional projects again. The first error msg goes now like that , how to fix ?? [DCC Fatal Error] ......t.pas(20): F2613 Unit 'FMX.graphics' not found.
  18. I found this post here : How popular is Pascal/Delphi in 2019 and did not know this : with a link . https://www.quora.com/How-popular-is-Pascal-Delphi-in-2019-and-how-big-are-its-capabilities-compared-to-other-languages Is this still true in 2021 ?
  19. FranzB

    InputQuery texts

    are you asking to modify the input dialog or are yos asking to get data from Delphi to Python or the opposite way ?
  20. there is a tool available on githut which supports the GetIt package manager for RAD Studio (Delphi) by calling the GetIt command-line. I need to install DosCommand component (available on GetIt) , but I found several DosCommand Classes on git, what link should I use to get correct DosCommand class ? AUTO GET IT
  21. how to get the FMXLInux package with an offline installation of Delphi found with autogetit this command , how to execute, getitcmd -ae -i="FmxLinux-1.48"
  22. I'm using delphi4python components with an app where I can define all config parameters by an ini file as given here : How to get the config data in windows is explained here : https://github.com/pyscripter/python4delphi/wiki/FindingPython found this on windows as show above 🙂 my problem, I found only working parameter set for RED HAT 7, but can't find the settings for ubuntu , any help - parameter set possible ?
  23. uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls, System.SyncObjs, FMX.Memo.Types, FMX.ListBox, System.IniFiles, PythonEngine, PythonVersions; var PyVersion: TPythonVersion; begin FPyVersions := GetRegisteredPythonVersions; for PyVersion in FPyVersions do cbb_Pyversions.Items.Add(PyVersion.DisplayName); if cbb_Pyversions.Items.Count > 0 then begin cbb_Pyversions.ItemIndex := 0; end; end; I failed to compile above code for LINUX OS, is there any workaround in the UNIX platform ?
  24. FranzB

    GetRegisteredPythonVersions for LINUX

    what is the correct path setting for using python4delphi with UBUNTU ? can I get a parameter recommendation
  25. based on demo code 34 I wrote this code with the following new features a) create Pythonengine and PythonInOut at run time b) config pythonengine from an INI file c) find/exchange config parameter for different python installations , UNIX systems here in this forum d) set path to python libs via this INI file, no need for recompile Issues with this code a) OS=WINDOWS : text output of python is not shown in the memo. Guess this is due to the fact that I create the PythonInOut at run time and the is no property defined ( memo, using FMX or VCL ???) b) OS=LINUX : text output of python is not shown in the memo but in the calling CMD Window of this app. Guess a fix of a) will also help here c) pls. share addition setting to python libs like numpy etc. , what settings worked on your computer , how to find our the correct parameter on my computer etc. ....... i added the complete project, pls. share your improvement ideas 🙂 the used config file for windows did not have any problem calling a few NumPy statements [PythonEngine] DLLName=python39.dll DLLPath= AutoFinalize=0 AutoLoad=0 AutoUnload=0 RedirectIO=0 UseLastKnownVersion=0 UseWindowsConsole=0 the used config file for LINUX, simple code runs well, but I failed to set the path to the NumPy lib on the target system [PythonEngine] DLLName=libpython3.6m.so DLLPath=/usr/lib/x86_64-linux-gnu/ AutoFinalize=0 AutoLoad=0 AutoUnload=0 RedirectIO=0 UseLastKnownVersion=0 Config_linux .ini Config_windows.ini P4Ddemo34Config.dpr demopython34config.fmx demopython34config.pas