Jump to content

FredS

Members
  • Content Count

    430
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by FredS


  1. I have a couple of instances where this is more useful without the LookupDataset, additions below:

    interface
    
    type
      TDictionaryLookupList = class(TLookupList)
      public
        /// <summary>
        ///   Binds a Dictionary Lookup List to a fkLookup Field
        /// </summary>
        class function Bind(const AField: TField): TLookupList;  
        /// <summary>
        ///   Binds a Dictionary Lookup List to a fkLookup Field without binding to a LookupDataSet
        /// </summary>
        /// <param name="AKeyFields">
        ///   Keyfields used to identify the Entry, (Default=EmptyStr) will use the Existing KeyFields value.
        /// </param>
        class function BindSimpleList(const AField: TField; const AKeyFields: string = ''): TLookupList;
      end;
    
    
    implementation
    
    type
      TFieldHelper = class helper for TField
        /// <summary> Sets Private Field </summary>
        procedure SetLookupList(ALookupList : TLookupList);
      end;
    
    procedure TFieldHelper.SetLookupList(ALookupList : TLookupList);
    begin
      if Assigned(LookupList) then LookupList.Free;
      with self do FLookupList := ALookupList;
    end;
    
    class function TDictionaryLookupList.Bind(const AField: TField): TLookupList;
    begin
      Assert(AField.FieldKind = fkLookup);
      AField.LookupCache := True;  
      Result  := TDictionaryLookupList.Create();
      AField.SetLookupList(Result);
    end;
    
    class function TDictionaryLookupList.BindSimpleList(const AField: TField; const AKeyFields: string = ''): TLookupList;
    begin
      AField.LookupDataSet := nil;
      if (AKeyFields <> EmptyStr) then AField.KeyFields := AKeyFields;
      Result := Bind(AField);
    end;

     


  2. I did and stopped due to: RSP-14723.

     

    However applying them via that dialog is inconvenient the better way is to use the 'Configuration Manager':

    image.thumb.png.5ff2d022a605af3d6436f8ee374853c8.png

     

    One example is to redirect output or change configuration for an entire project group.
    I used this a lot for UniDAC's FastReport components to change output directories.
     

    Each time  new version was made available I would simply run the 'Configuration Manager' using an altered Option Set before compiling.

     

     

     

     

    • Like 1

  3. 2 hours ago, dummzeuch said:

    came across this property for the first time

    • create an action aiOnIdle using the forms caption
    • link it to the form
    • name the update event OnIdle

    Then use that event as needed, beware the OnIdle event won't fire when a modal dialog is up.
    Unlike the TActionList.OnUpdate event this one will fire as long as the form is enabled.

     


  4. 6 hours ago, rvk said:

    already got this working

    Feeling ignored?

     

    That code is literally from last century and had no incling about WIN64..

    Although I haven't really looked at it your changes is what I needed to change in my code. Which by the way is blocked by Delphi and is NOT a commercial solution.

    There has been little demand for hooks in my current project so there was no need to even look at it other than as  an exercise.

     

    Another reason not to get involved here is that I and you can find the solution with very little effort, but system wide hooks in Windows 1984.. err.. 10 are not so reliable.
    The one place we use a hook that absolutely needs to work madCodeHook is used in a signed Driver (special certificate).

     

     


  5. 38 minutes ago, Darian Miller said:

    "Paying the piper" comes to mind.  

    OK, but there is that 'other' stuff, you know 'GetIt' the flagship library management system down for nearly a month now.. well I don't want rub salt in it but at some point some bean counter will ask why the shop using C++Builder can't build an Android app...

     

     

    • Sad 1

  6. 9 minutes ago, PeterBelow said:

    what statement the breakpoint is actually on

    Project1.dpr.25: var Eins := NewBytes;  // Put a Breakpoint
    0041E5AD 33C0             xor eax,eax
    0041E5AF A3DC684200       mov [$004268dc],eax
    0041E5B4 33C0             xor eax,eax
    0041E5B6 55               push ebp
    0041E5B7 68BEE64100       push $0041e6be
    0041E5BC 64FF30           push dword ptr fs:[eax]
    0041E5BF 648920           mov fs:[eax],esp

     


  7. Today was my first attempt to actually use these, but that ended once I placed a Breakpoint on one.

     

    Perhaps not news to others..

     

    program Project1;
    
    {$APPTYPE CONSOLE}
    {$R *.res}
    
    uses
      System.SysUtils;
    
    {$INLINE OFF}
    
    function NewBytes:TBytes;
    begin
      SetLength(Result, 10);
    end;
    
    begin
      try
        /// <summary>
        ///   F9 from the Breakpoint will repeat 3 times, once for each Inline Variable
        ///   Uncomment the others to prove my point
        /// </summary>
        /// <remarks>
        ///   You can also try F7 or F8
        /// </remarks>
        var Eins := NewBytes;  // << Breakpoint
        var Zwei := NewBytes;
        var Drei := NewBytes;
    
    //    var NochEins := NewBytes;
    //    var NochZwei := NewBytes;
    //    var NochDrei := NewBytes;
    
        writeln('Something Happened!');
      except
        on E: Exception do
          Writeln(E.ClassName, ': ', E.Message);
      end;
    end.

     


  8. 6 hours ago, Stefan Glienke said:

    registry does not by default

     

    from: https://docs.microsoft.com/en-us/windows/win32/sysinfo/predefined-keys

    All registry entries in HKEY_CURRENT_USER except those under HKEY_CURRENT_USER\Software\Classes are included in the per-user registry portion of a roaming user profile. To exclude other entries from a roaming user profile, store them in HKEY_CURRENT_USER_LOCAL_SETTINGS.


  9. 4 hours ago, miab said:

    GetIt enforces its own installation logic

     

    If you pause at the License stage then in most cases the setup has been downloaded and or information exists pointing back to the GitHub source of the files.
    I was able to install Codesite Express from a previous 10.3.1 install even after GetIt was down.

     

    BTW: For Github sourced stuff I never finish the installation, I don't like source files added to my paths by the default installer when the IDE itself has been shown to choke on all that during Code Insight parsing.. I also don't need a separate copy of Abbrevia for each and every Delphi version.

     

×