Jump to content

Fritzew

Members
  • Content Count

    66
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Fritzew

  1. Fritzew

    Delphi and the new Apple M1 CPU

    I don't think there will be an Emulation on M1 for running x86 Windows. So as Delphi Developer the latest 2019 MPro will be the latest. I would like to see an option but without a ARM Windows with a fast Emulation? no hope. I have here a a 2019 MacBook Pro 16" with I9 from last year so I think there is time to wait. But the "want have" is so "BIG".
  2. Fritzew

    VCL Handling of dpi changes - poor performance

    In short: Yes
  3. Fritzew

    Improving type safety

    Look at this: program Project20; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type TVectorD3 = record x, y, z: Double; end; TDirection = type TVectorD3; {$WARN UNSAFE_CAST ON} procedure Test; var V: TVectorD3; D: TDirection; begin V := default (TVectorD3); D := TDirection(V); end; begin try Test; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. Will also produce a Warning. So if you enable UNSAFE_CAST there will be a lot of Warnings. And every place surround with a {$WARN UNSAFE_CAST OFF} is a bad Idea But I'm with Stefan here. A new Warning for Pointer Assignment would be fine.
  4. Fritzew

    TNothingable<T>

    What is the usecase? sorry for asking, but I want to understand....
  5. I would declaree it all as types so t type Pmedia_track_t = libvlc_media_track_t^; PPmedia_track_t = ^Pmedia_track_t; and then function libvlc_media_tracks_get(p_md : libvlc_media_t_ptr; var tracks : PPmedia_track_t) : LongWord; cdecl; procedure libvlc_media_tracks_release(tracks : PPmedia_track_t; i_count : LongWord ); cdecl; use as: var LTracksPtr : PPmedia_track_t; LTrackUse : Pmedia_track_t; LTracks : libvlc_media_track_t; // a record LCount : int32; begin LCount := libvlc_media_tracks_get( FVLCMIntf, LTracksPtr ); // FVLCMIntf is just (an initialised) pointer LTrackUse := LTracksPtr^; LTracks := LTrackUse^ ; // The above will point to the first record you can increment for the following or use a Array[0..0] of Pmedia_track_t libvlc_media_tracks_release( LTracksPtr, LCount ); // should work end;
  6. Fritzew

    Delphi and Parallels for Mac

    with Parallels 16.1 and Big-Sure I don't see the problem anymore. But my Setup is a external Magic Trackpad and Keyboard. Settings for Keyboard and Mouse in Parallels id automatic Game detection
  7. Simply remove the keybinding in the MMX Settings.
  8. I'm using Spring4D all the time. Run the Test without debugger...... for me It is one of the best, correction, the best library for Delphi.
  9. Fritzew

    Delphi 10.4.1 and the IDE FIx Pack

    You have never worked with C++ ? I don't think we will see it before a CE
  10. Fritzew

    Analyze interbase slow queries

    I would recommend https://www.upscene.com Using it since years. Love it, but I see now I should really upgrade to the latest Version of the Workbench
  11. What are you smoking? Maybe you as technician should lern to read the docs? http://docwiki.embarcadero.com/Libraries/Rio/en/FMX.Grid.TStringGrid_Properties
  12. Why using a finally here and not an except block? Then you will only free it if there is a Exception.
  13. Yes, it was one of the best moves we have done. The Layout-Control is a amazing component. We have refactored a big application to it (around 300 Forms) and it that has solved all of the problems with High-DPI. But the best, all of the translations problems, length of text's in label's etc are gone now. We supporting 7 languages.
  14. Fritzew

    modbus

    Hello all, is the a working actual modbus tcp implementation around? Got a new project to work on for a cnc. To be honest I have never used modbus myself so I'm don't know
  15. Fritzew

    Sourcetrail support for Delphi

    Wow, i was playing with this tool now for an hour or so, using a large c++ project. Amazing work
  16. Fritzew

    Code formatter in CnPack

    There could be done a lot in the language: In Elements: case myControl of Button: writeln("Looks like a button!"); CheckBox: writeln("This one's a checkbox"); else writeLn("No ide what this is!?"); end; or something like: var i: Integer; var s := case i of 0: 'none'; 1: 'one'; 2: 'two'; 3..5 : 'a few'; else 'many'; end; I like it. If somebody is interested in what can be done look at https://docs.elementscompiler.com/Oxygene/Language/ Using Elements a lot these days, it is always a shock come back to Delphi.... Not speaking about Lambdas..... Delphi: for item in List.Where( function(part : TPart): boolean begin result := part.isVisible; end ) do; Elements: for each item in List.Where(part -> part.isVisible) do;
  17. Fritzew

    With's the deal with "With"?

    Yes, please! proper namespacing like in Remobjects.Elements would be ...........
  18. Fritzew

    Spring4d and Rio

    It is in the master since sept 03 2018. Maybe you should update your clone?
  19. Fritzew

    Component Compatibility 10.3.2 vs. 10.3.1?

    For Devexpress it will work..... But if you want to go sure just use their installer and recompile
  20. Fritzew

    Overflow in Compile

    Delphi 10.3.2 This code will not compile! Stripped down from a TestSuite for our codebase. Can't believe it. program Project17; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; Procedure Test; var int32max: Int64; begin int32max := MaxInt + 1; //Error here writeLn(Format('Integer %20d', [int32max])); writeLn(Format('Integer %20u', [-int32max])); end; begin try Test; readln; except on E: Exception do writeLn(E.ClassName, ': ', E.Message); end; end. Error (in German) [dcc32 Fehler] Project17.dpr(13): E2099 Überlauf bei Konvertierung oder arithmetischer Operation
  21. Fritzew

    Overflow in Compile

    You are right and I I need a break for sure..... int32max := Int64(MaxInt) + 1; // will work Shame on me
  22. There is a commit from yesterday on Bitbucket, so I think you should update......
  23. Fritzew

    On The Design Of Uses Clauses

    Yes this look like a nightmare, if you want to parse the source and not only create a AST
  24. Found today in System.Types........ class operator TPoint.Explicit(Value: TPoint): TSmallPoint; begin if Value.x < Low(SmallInt) then Result.x := Low(SmallInt) else if Value.x > High(SmallInt) then Result.x := High(SmallInt) else Result.x := SmallInt(Result.x); if Value.y < Low(SmallInt) then Result.y := Low(SmallInt) else if Value.y > High(SmallInt) then Result.y := High(SmallInt) else Result.y := SmallInt(Result.y); end; Useless and wrong Code...
×