Jump to content

TurboMagic

Members
  • Content Count

    235
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by TurboMagic


  1. Well, when I provide an SQL query for the reader as you describe I'm getting more inflexible
    when adding new fields to that table in comparison to only having to deal with cases where a "not NULL"

    for a column needs to be dealt with.

     

    Since Uwe hints that a SQLWriter will not call OnNewRecord I will try the TFDBatchMoveDataSetWriter now.

    If that calls this event and lets me call FieldByName it should do.


  2. I tried OnNewRecord now, but it doesn't seem to get called. What am I'm doing wrong?

     

    Here I assign OnNewRecord via code, since FWriter is created at runtime:

    FWriter.FDDataSet.OnNewRecord   := OnNewRecord;

     

    Here's the implementation of that event:

    procedure TDBCopy.OnNewRecord(DataSet: TDataSet);
    begin
      if (FWriter.ActualTableName.ToUpper = 'KASSE_EINSTELLUNGEN') then
      begin
        DataSet.FieldByName('DRAWBACK_CALCULATION').AsInteger := 0;
      end;
    
      if (FWriter.ActualTableName.ToUpper = 'KASSE_PRINTSETTINGS') then
      begin
        DataSet.FieldByName('PRINT_SMALL_BONS').AsInteger := 0;
      end;
    end;

    But when running FBatchMove.Execute; the breakpoint in the event is never ever called.

    And the way my application crashes indicates that it's actually never run.

     

    Do I need to activate something somewhere?

    I only assign TableNames to FReader.TableName and FWriter.TableName and then run FBatchMove.Execute;


  3. Ok, I can query this TXT record now, when I know the IP of one of our internal DNS servers.

    But how to find that one out?

    Yes, cmd.exe -> ipconfig /all would tell me, but I need to implement this internally.

    I tried to understand what THTTPCli does to determine that, but I failed to do so.

    Is there some other easier solution available to get such an IP-address?

    I know that I can have several connections and thus several DNS servers. but I think I can manage
    when I get a list of all those.


  4. I have D10.4.2 with ICS 8.65 installed (having not had any need for ICS in the recent years I only got aware of V9.0 now).


    I would like to read out the contents on a DNS TXT record. For this I looked at the OverbyteICSNSLookup sample application.

    While this can display a bunch of stuff read out from DNS I don't see where the contents of a TXT record if accessed.
    I don't want to parse the raw DNS answer. I guess there's some simpler way available. The only string like thing I found
    was AnswerName but that doesn't really sound like it.


  5. On 11/15/2023 at 11:25 AM, Angus Robertson said:

    Looking at the D2010 package, there is typo, you need to correct the post-build command to change a win64 to win32, since D2010 does not have Win64 so the directory will not exist,

    As far as I remember Win64 compiler was introduced with D2009 already.


  6. On 11/10/2023 at 11:20 AM, mvanrijnen said:

    Yes, they should turn it around, first release the CE as a preview,,  get the community to work for you, they will if you provide them a free IDE.

    Go more to a system as MS does, you need to have a payed license if you have $xxx  in annual revenue.......

     

     

    The issue is: CE is such a system. You are only allowed up to a certain $$$$ you make a year. But EMBT isn't MS which has more revenue streams and thus can better stay profitable even if a number of persons misuse the free version as replacement for the paid one. That's also the reason why CE only is being released months after a new major release.


  7. On 11/10/2023 at 11:14 AM, Anders Melander said:

    No, but making a Delphi 12 preview available most likely would have solved it.

    These closed betas are a ridiculously out-of-date way of doing things.

    Well, paying subscription users usually get an invitation to the beta as well nowadays afaik.


  8. On 11/8/2023 at 7:30 PM, John van de Waeter said:

    No Mobile? I have Android and iOS since the beginning, as well as a subscription... I did check iOS and Android in the features panel, but they don't appear as a target OS...
    My "keys" on My.Embarcadero.com don't mention "mobile" either....  glitch?

    Not sure where you looked at, but for Delphi Android and iOS are supported. For Android the SDK 33 requirement is fullfilled with 12.0 now.
    If you should be a C++ Builder developer things would look differently, but since this is a Delphi forum I doubt you are one... 😉


  9. On 6/6/2022 at 1:44 PM, vfbb said:

    2) Deployment:

    • On 32bit, the remote path "library\lib\armeabi-v7a\"
    • On 64bit, the remote path "library\lib\arm64-v8a\"
    • Also on 64bit, add the 32bit binary with the remote path "library\lib\armeabi-v7a\" and the condition "'$(AndroidAppBundle)''==''true'" (with the quotes). The condition you can only change via ToolsApi or manually in .dproj.

    See how we do it: https://github.com/skia4delphi/skia4delphi/blob/eed4afbf8a34137a9bfa308bcb5ef87cee84abcb/Source/VCL/Designtime/Skia.Vcl.Designtime.ProjectMenu.pas#L219-L221

     

     

    I also struggle to load a .so. In my case the .so was created in Delphi for testing purposes. I tried to follow your idea with the deployment but I didn't fully understand this yet.

    Is this only relevant if I'm building an .aab later on?

    I'm currently still struggeling with a normal apk / debugger / debug build.
    I'm currently using an Android 11 device but will test on a Android 13 device in a few minutes. On the device used the first call to SafeLoadLibrary results in a Segmentation fault(11) crash.
    Here's my code:

    procedure Tf_Main.b_CalcClick(Sender: TObject);
    var
      Handle : HMODULE;
      s : string;
    begin
      Memo1.Lines.Clear;
    
      s := TPath.Combine(TPath.GetLibraryPath, 'libSO_Test.so');
      if System.SysUtils.FileExists(s) then
        Memo1.Lines.Add('Exists');
    
      Handle := SafeLoadLibrary('libSO_Test.so');
      Memo1.Lines.Add('Handle1: ' + Handle.ToString);
      if (Handle = 0) then
        Handle := SafeLoadLibrary(s);
    
      Memo1.Lines.Add('Handle2: ' + Handle.ToString);
    
      if (Handle <> 0) then
      begin
        try
          FDoAdd := GetProcAddress(Handle, PChar('DoAdd'));
    
          if (@FDoAdd = nil) then
              Memo1.Lines.Add('Failure loading proc (is nil)')
          else
          begin
            l_Result.Text := FDoAdd(tf_Summand1.Text.ToInteger,
                                    tf_Summand2.Text.ToInteger).ToString;
            FDoAdd := nil;
            Memo1.Lines.Add('Success');
          end;
        finally
          FreeLibrary(Handle);
        end;
      end
      else
        Memo1.Lines.Add('SO handle is invalid');
    end;

    Any idea?


  10. This is the information that I added a few things in development branch of this tool lately. I updated the command line code coverage tool used
    and started to add the new parametrs it provides. I haven't yet added all and I don't think all make sense for this tool, but you might still want
    to try it out. I haven't tested those additions yet, as I don't fully understand yet how they must be used from that bit of documentation provided
    for them and now I have lack of time, but I still hope they're usefull as is.

     

    So if I get feedback on them (and I didn't completely missunderstand those) I might still get a new release together soon.

     

    Cheers

    TurboMagic

    • Thanks 3

  11. Hello,

     

    the DEC (Delphi Encryption Compendium) library recently got a pull request from somebody to make it more compatible with FPC.
    While that's nice I took that request, but found out later, that it made it no longer compile on Delphi.

    With some help of Stevie I got that fixed, but I guess it now doesn't compile on FPC anymore.

    The issue is the use of IFDEF/IFEND etc. constructs.

     

    While I want to stay FPC compatible with DEC I have not enough knowledge of FPC and I also lack the time to look after that
    part right now. So I'd be grateful if somebody could look at this and make suggestions how to change it so that it is compatible
    with both.

     

    Cheers

    TurboMagic


  12. I'll try to find the time to look into those examples tomorrow. I have to find the cause of some memory issue where my report generating class gets
    an interface reference, which it stores as a field in the object instance.  It takes some of the data from it and assigns that to the report components

    in OnGetValue event. But when that event is called, the field with the interface reference is NIL!

     

    I haven't found out yet, who nils that reference or who overwrites that memory... 😞

×