Jump to content

FranzB

Members
  • Content Count

    49
  • Joined

  • Last visited

Everything posted by FranzB

  1. FranzB

    create delphi4python at run time

    did a code rework and need to ask a different question
  2. FranzB

    Can't load package Python$(Auto).bpl

    update to 10.4.2 done installation is now perfect ! Many thanks for your help
  3. how to use madexcept inside a DLL? the DLL does not contain any form the DLL does not write any test to a console - just a set of data processing functions - drag and drop of mashi component does not work
  4. FranzB

    madexcept inside a DLL

    using : http://help.madshi.net/HowToUseMadExcept.htm I added : uses madexcept, system,.... ....; end; but after a run time error in my console / DLL application no madshi form is created , or any other error report ....
  5. I use 2 Polygon definitions as in the code below type TPolygon = array of TPoint T4Polygon = array [1..4] of TPoint ; .... function ProcessPolygon (aPoly : TPolygon); begin end; is there a better way to call the function ProcessPolygon with a variable of the T4Polygon ? I don't want to copy the data from one data type to the other, writing overloaded functions seems to my also not the best solution , any better idea ?
  6. I want to use this class with an array of TPoint type. type TedgearryPoints = Array [1..4] of TPoint ; type TGEORect = class ..... private : Fedges : TedgearryPoints ; public : ..... property edges : TedgearryPoints read Fedge write Fedge; end; but the code fails because I can not assign data to the individual edges MyGEORECT.Edges[1] , compiles says "[dcc64 Error] GEOUnit.pas(1303): E2064 Left side cannot be assigned to "
  7. but this means : I have to write extra code if I want to assign just one edge with your solution above via property or if I want to assign all 4 edge with one command making the edge variable public: allows both, but I think from class design this look not that good type TGEORect = class private : ..... public : edges : TedgearryPoints ; end;
  8. I installed delphi 10.4 , but now I failed adding components via GETIT with error msg , How to solve ?
  9. I tried to execute the FMX demos of Python for Delphi ( . https://github.com/pyscripter/python4delphi ) OS = WIN 64 no problem I can compile this code for LINUX / UBUNTU as well, but I can't execute error msg Exception EAccessViolation in module libicuuc.so.60 at 00007FA5A18A15EB. Access violation at address 00007FA5A18A15EB, accessing address 0000000003A73000 how to fix this error ?? Remark : same exe copied to RED HAT V 7 system, execution seems to be perfect after 1st. test ..... questions goes more to help on config my ubuntu system 😞
  10. 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;
  11. i like to use https://github.com/malcolmgroves/FluentLiveBindings var BindSourceDB1: TBindSourceDB; begin aServername := edt_Servername.Text; adatabasename := edt_databasename.Text; ConnecttoDatabase(aServername, adatabasename, aConnection); aQuery.SQL.Text := 'select * from Mytab'; aQuery.Active := True; BindSourceDB1 := TBindSourceDB.Create(Self); BindSourceDB1.DataSet := aQuery; BindingsList1.BindGrid(grd_objecttab).ToBindSource(BindSourceDB1); but run time error msg is now like below , any idea for this error ?
  12. is there an option to increase the amount of information written to the XML outputfile ? a) I want to add all parameter for a testcase to the XML log b) I want to add some information during the test case execution to the XML log my code follow the basic instructions given for DUNITX var runner : ITestRunner; results : IRunResults; logger : ITestLogger; nunitLogger : ITestLogger; begin try //Check command line options, will exit if invalid TDUnitX.CheckCommandLine; //Create the test runner runner := TDUnitX.CreateRunner; //Tell the runner to use RTTI to find Fixtures runner.UseRTTI := True; //tell the runner how we will log things //Log to the console window logger := TDUnitXConsoleLogger.Create(true); runner.AddLogger(logger); //Generate an NUnit compatible XML File nunitLogger := TDUnitXXMLNUnitFileLogger.Create(TDUnitX.Options.XMLOutputFile); runner.AddLogger(nunitLogger); runner.FailsOnNoAsserts := False; //When true, Assertions must be made during tests; //Run tests results := runner.Execute; if not results.AllPassed then System.ExitCode := EXIT_ERRORS; {$IFNDEF CI} //We don't want this happening when running under CI. if TDUnitX.Options.ExitBehavior = TDUnitXExitBehavior.Pause then begin System.Write('Done.. press <Enter> key to quit.'); System.Readln; end; {$ENDIF} except on E: Exception do System.Writeln(E.ClassName, ': ', E.Message); end; end.
  13. FranzB

    Draw TBitmap

    I want to insert a bitmap on it's own left side again using canvas.drawbitmap function but actually this code does not do anything..... can't see my mistake here 😞 procedure InsertonMyleft(aBMP : TBitmap); var tempBMP: TBitmap; RecFull: TRectF; RecLeft: TRectF; begin tempBMP := TBitmap.Create; try aBMP.Canvas.BeginScene; tempBMP.Assign(localBMP); tempBMP.SaveToFile('c:\temp\debugme.bmp'); RecFull := RectF(0, 0, aBMP.Width, aBMP.Height); RecLeft := RectF(0, 0, round(aBMP.Width / 3), round(aBMP.Height / 1)); aBMP.Canvas.DrawBitmap(tempBMP, RecFull, RecLeft, 50, True); aBMP.Canvas.EndScene; aBMP.SaveToFile('c:\temp\debugme2.bmp'); finally tempBMP.Free; end; end;
  14. FranzB

    Draw TBitmap

    procedure InsertonMyleft(aBMP: TBitmap); var tempBMP: TBitmap; RecFull: TRectF; RecLeft: TRectF; begin tempBMP := TBitmap.Create; try // tempBMP.Assign(aBMP); // tempBMP.SaveToFile('c:\temp\debugme.bmp'); tempBMP.LOadfromFile('c:\temp\debugme3.bmp'); RecFull := RectF(0, 0, aBMP.Width - 2, aBMP.Height - 2); RecLeft := RectF(0, 0, round(aBMP.Width / 3), round((aBMP.Height - 1) / 1)); aBMP.Canvas.BeginScene; aBMP.Canvas.DrawBitmap(tempBMP, RecFull, RecLeft, 50, True); aBMP.Canvas.EndScene; aBMP.SaveToFile('c:\temp\debugme2.bmp'); finally tempBMP.Free; end; end; if I load a bitmap from a file , my code works fine but the assign sequence does not have the desired function, (insert the bmp on the left side) even the savetofile saved the correct bitmap content
  15. FranzB

    Draw TBitmap

    already changed to width-1 ...... see code above RecFull := RectF(0, 0, aBMP.Width-1, aBMP.Height-1); // size of full trect, 0,0,500,500
  16. FranzB

    Draw TBitmap

    I changed the code to make it a full separate process function like below , Trect full has correct size 0,0,500,500 and Trect left size is 0,0,250,500 image size is 501 x501 pixel but still no effect from this code 😞 procedure InsertonMyleft(aBMP : TBitmap); var tempBMP: TBitmap; RecFull: TRectF; RecLeft: TRectF; begin tempBMP := TBitmap.Create; try aBMP.Canvas.BeginScene; tempBMP.Assign(aBMP); tempBMP.SaveToFile('c:\temp\debugme.bmp'); RecFull := RectF(0, 0, aBMP.Width-1, aBMP.Height-1); // size of full trect, 0,0,500,500 RecLeft := RectF(0, 0, round((aBMP.Width-1) / 2), // just lest side round((aBMP.Height-1) / 1)); aBMP.Canvas.DrawBitmap(tempBMP, RecFull, RecLeft, 50, True); aBMP.Canvas.EndScene; aBMP.SaveToFile('c:\temp\debugme2.bmp'); finally tempBMP.Free; end; end;
  17. use TPath and change before drawing again or use TObjectList and always draw the full objectlist , individual items are rects .....
  18. I'm suffering some strange issue, guessing that the function fileexist will not work 100 % stable, if I check for filenames with several spaces .... filenamestr := 'my report from home.csv' if fileexists () then begin .... end else begin ..... end; on some computers, some folders, ... this seems to work, other computer and folder structure this call fails ....
  19. always full path like: variation : OS language, Computer hardware ,......
  20. the identical setup as mentioned here , I did on second computer, now with MYSQL database server how to evaluate the correct connection parameters using Delphi and firedac @ LINUX
  21. FranzB

    Connect MSSQL Server

    I'm running 2 MSSQL Servers on my Computer MSSQL Server #1 : installed on WIN 10 Host OS on my Computer MSSQL Server #2 : installed on VM Ware LINUX ( UBUNTU 18.04) Client, I also installed AZURE data studio inside the VM Ware OS Q1 : How to connect from AZURE data studio to SQL Server #2, I failed with different settings so far :-(, what will be the correct server name ?? Q2 : How to connect to MSSQL Server #1 on HOST OS ?? Computername\sqlexpress does not work from AZURE data studio, but this works fine connecting directly from HOST OS to this MSSQL server I#m using VM network settings = Bridged
×