Jump to content

TimC

Members
  • Content Count

    10
  • Joined

  • Last visited

Posts posted by TimC


  1. I found (3) techniques that allow one to access an object by other than its name BUT there seems to be one point in each of these techniques that require the object name to be changed in a single spot, essentially the object name is linked to an abstraction layer of sortS (COURTESY OF CHAT GPT:

     

     

    1. USING OBJECT REFERENCE

     

    var
      MyObject: TMyObject;
    begin
      MyObject := Form1.SomeObject;
      MyObject.Property := Value;
      MyObject.Method;
    end;

     

    2. USING AN INTERFACE

     

    var
      MyInterface: IMyInterface;
    begin
      MyInterface := Form1.SomeObject as IMyInterface;
      MyInterface.Property := Value;
      MyInterface.Method;
    end;
     

     

    3. USING A LOOKUP TABLE

     

    var
      ObjectDictionary: TDictionary<string, TObject>;
    begin
      ObjectDictionary := TDictionary<string, TObject>.Create;
      ObjectDictionary.Add('ObjectKey', Form1.SomeObject);
      
      (ObjectDictionary['ObjectKey'] as TMyObject).Property := Value;
      (ObjectDictionary['ObjectKey'] as TMyObject).Method;
      
      ObjectDictionary.Free;
    end;
     

     

    4.  USING RUNTIME TYPE INFORMATION:

     

    uses
      RTTI;

    var
      Context: TRttiContext;
      RttiType: TRttiType;
      RttiProp: TRttiProperty;
      Obj: TObject;
    begin
      Obj := Form1.SomeObject;
      RttiType := Context.GetType(Obj.ClassType);
      RttiProp := RttiType.GetProperty('Property');
      if Assigned(RttiProp) then
        RttiProp.SetValue(Obj, Value);
    end;
     

    At first glance, I am drawn to the idea of the LOOKUP Table, it seems like a pretty clean way to setup a central point to manage object reference

     

    Any comments on this topic from the group?

    Best Regards

    -Tim C.

     


  2. I am running v12.1 IDE.  I cannot seem to have multiple tools bars visible at the same time.  For example if I want to use the VIEW toolbar so I can toggle between the UI and the code I cannot hat the debug toolbar enabled.  Or vice-versa.

     

    Has anyone else seen this behavior?  Does anyone have a fix?

     

    Thanks in Advance

    -Tim C.


  3. Hello, I am having an issue with RAD Studio 12.1 Tool Bars.  I enabled the Position ToolBar and then attempted to move it.  At which point it disappeared.  I have tried various toggles on/off, restarting the app, restarting the PC, and toggling Workspaces.  But nothing brings the Position Toolbar into view, Does anyone have a suggestion that may resolve the situation?

     

    ADDITIONAL INFO / UPDATE

    It occurred to me there are two ways to launch the IDE, DPI Aware and DPI Unaware.  I loaded the DPI Aware version of the IDE and I noticed the Position toolbar appeared on the start screen.  I then loaded a project an it disappeared.  I then toggled other Toolbars and was able to get the Position Toolbard to remain visible.

     

    What I picked up on it that there appears to be a limit to the number of visible toolbars.  I am not sure if that is the case.  At the end of the day, I feel the displaying of the Toolbars in the IDE is a bit wonkey, at least on my end.  

     

    Does anyone know if there is a way to change the size of the Toolbar Icons,  Perhaps through the registry?

    I am curious to know if some tweaking in that area would help or worsen the results.

     

     

    Thanks in Advance

    -Tim C.

×