Jump to content

dmitrybv

Members
  • Content Count

    48
  • Joined

  • Last visited

Everything posted by dmitrybv

  1. dmitrybv

    Does FMX designer support frame inheritance?

    Yes, you are right. Changing the line object InheritedFrame: TInheritedFrame to inherited InheritedFrame: TInheritedFrame fixes the problem with the ClientHeight, ClientWidth properties in the fmx file. That is, Frames only support visual inheritance. Although for a Form, if there is no fmx file in the base form, it is not necessary to use inherited.
  2. dmitrybv

    Does FMX designer support frame inheritance?

    1. This file was created by RAD Studio designer. I did not modify it manually. 2. Why do I need inherited here if the base class - TBaseInTabFrame does not have an fmx file? 3. I created a new frame TInheritedFrame, then in the unit file UnitInheritedFrame, I changed the line TInheritedFrame = class(TFrame) to TInheritedFrame = class(TBaseInTabFrame), because I need to have several basic methods for all frames of my project in the base class TBaseInTabFrame.
  3. Hello. Is there any set of recommendations on how to correctly perform checks and write code in a project that will compile under Windows Desktop and Android Mobile? For example, how to open windows correctly and organize the transition back and forth if the full-screen mobile mode is working. What to use instead of MainMenu and PopupMenu in mobile applications?
  4. Are there methods in the TValue class or in Rtti to convert a string to the desired simple type (Like Integer, Float, DateTime)? TValue has a method that converts a simple value to a string - TValue.ToString, but there is no reverse method TValue.FromString. I tried using StrValue.Cast<Integer>(); but this method throws 'Invalid class typecast' exception. procedure TFormSimpleDraw2.Button3Click(Sender: TObject); var StrValue: TValue; IntValue: TValue; Str: String; begin IntValue := 10; StrValue := IntValue.ToString(); // IntValue := TValue.FromString(Str); IntValue := StrValue.Cast<Integer>(); end;
  5. Should TValue.AsVariant for TBcd type return Custom Variant of TFMTBcdVariantType? Is there a connection between the TFMTBcdVariantType and TValue types. I would like TValue.AsVariant for type TBcd to create a Variant with type TFMTBcdVariantType (TFMTBcdVarData) and return a Custom Variant. Currently this code returns an 'Invalid class typecast' exception. How to correctly check that for a certain 'record' type there is a corresponding Custom Variant type and when calling TValue.AsVariant the creation of the corresponding Custom Variant value is called? Here is a code example: uses System.SysUtils, System.Types, TypInfo, System.UITypes, System.Classes, System.Variants, .... System.Generics.Collections, System.Rtti, Data.FmtBcd, type TListItemObj = class(TPersistent) private FSecondName: String; FFirstName: String; FAge: Integer; FBigUInt: UInt64; FFmtBcd: TBcd; public property FirstName: String read FFirstName write FFirstName; property SecondName: String read FSecondName write FSecondName; property Age: Integer read FAge write FAge; property BigUInt: UInt64 read FBigUInt write FBigUInt; property FmtBcd: TBcd read FFmtBcd write FFmtBcd; end; procedure TForm1.Button1Click(Sender: TObject); var LType: TRttiType; AllProps: TArray<TRttiProperty>; Prop: TRttiProperty; RttiContext: TRttiContext; ValValue: TValue; VarValue: Variant; ListItem: TListItemObj; begin ListItem := TListItemObj.Create; with ListItem do begin FirstName := 'P'; SecondName := 'C'; Age := 33; BigUInt := 12345678900987654321; FmtBcd := 112233445566778899.000011; end; RttiContext := TRttiContext.Create; LType := RttiContext.GetType(TListItemObj); AllProps := LType.GetProperties(); for Prop in AllProps do begin ValValue := Prop.GetValue(ListItem); VarValue := ValValue.AsVariant; end; ListItem.Free; end;
  6. When I try to install my Fmx package in RAD Studio IDE I get the following error. [dcc32 Fatal Error] F2084 Internal Error: AV50ECCF6F(50E50000)-R3C4F6564-0 I don’t even understand how I can get closer to understanding the cause of this error. I select the package DclEhLibFmx.dproj Click Context Menu – Install I'm getting this error.
  7. Hello. When installing RAD Studio, the ListCollectionsSampleProject.dpr project is added to the C:\Users\Public\Documents\Embarcadero\Studio\23.0\Samples\Object Pascal\Multi-Device Samples\User Interface\ListCollections folder, which shows how to create and link collections to control TListBox. How to correctly add the TBindNavigator component to the Form in this project so that you can use it to move through the list from the TListBox? The TBindNavigator control has a DataSource property of type TBaseLinkingBindSource. But the Form does not have a component that would inherit from TBaseLinkingBindSource. So TBindNavigator.DataSource cannot be assigned anything. Although TListBox is supposed to communicate with data through a descendant of TBaseLinkingBindSource, the project uses the TBindList component. But it cannot be assigned to the TBindNavigator.DataSource property.
  8. 1. I wonder why the FMX developers changed the logic of the FreeNotification method in the TFmxObject class so much. The `TComponent.FreeNotification` method adds a component to the list of components that will receive a message when deleted. The `TFmxObject.FreeNotification` method sends the opRemove message. 2. The `TFmxObject.AddFreeNotify` method does not check that the component is already present in the list. In this way, you can accumulate a huge number of references to the same object. How can I configure the algorithm so that my object is added only once?
  9. Hello Should the debugger stop at breakpoints in the program sources in Debug + Android 64-bit mode? Build Configuration (Debug) Target Platforms (Android 64-bit) It doesn’t stop for me and highlights the breakpoint as inaccessible.
  10. dmitrybv

    Breakpoints in Debug + Android 64-bit mode.

    Development mode and enable USB debugging is Active on my Device. I can run App from RAD Studio to my phone.
  11. dmitrybv

    Breakpoints in Debug + Android 64-bit mode.

    I have no problems with VCL programs. Breakpoints in all my Win32, Win64 programs work correctly. And the debugger stops at them. But I can’t create even the simplest Android application (64-bit or 32-bit) in which I could set a breakpoint in the application sources. Although the application is compiled in Build Configuration (Debug). As far as I know, Delphi does not have PAServer for Android. Debugging capabilities are already built into the Android operating system.
  12. Hello. Tell me why RAD Studio may not see the connected Android device? I have Xiaomi Mi Max 3. The latest USB driver for the device has been updated. Debugging is enabled on your phone. Windows explorer sees the device. Device Manager sees the device. In RAD Studio, the device is not visible in the Target section. When you click Target-Refresh, a message appears Would you like to update the platform SDK now? Yes No When you click Yes or No, nothing happens.
  13. Thanks Dave. That helped. Most likely adding/removing Features uses online downloads, and the offline installation file RADStudio_12_1_61_7529.iso does not contain all files for AndroidSDK-2525.
  14. I have Embarcadero RAD Studio 12 Version 29.0.51961.7529 It seems that the AndroidSDK-2525-23.0.51961.7529 folder does not contain all the necessary files. Folder size C:\RADStudio\23.0\CatalogRepository\AndroidSDK-2525-23.0.51961.7529\ - 285 MB No subfolders C:\RADStudio\23.0\CatalogRepository\AndroidSDK-2525-23.0.51961.7529\platform-tools AND C:\RADStudio\23.0\CatalogRepository\AndroidSDK-2525-23.0.51961.7529\platforms But how could this happen? When installing RAD Studio, I checked all the Target Platform boxes - Android, Android SDK and Eclipse Temurin OpenJDK. Installation files: radstudio_12_esd_117529a.exe │ 169 M radstudio_12_esd_117529a.gof │7239 M Bytes: 7 767 801 701, files: 2, folders: 0 Can this be fixed somehow?
  15. How can you track that the mouse is over within the boundaries of the control, regardless of the Child controls? If the mouse inside the Parent control moves to the Child control, then the OnMouseLeave event is triggered for the Parent control, although we are still within the boundaries of the Parent control. For example, I created a project in which I try to highlight the Parent control in red while we are within the boundaries of the Parent control. But as soon as the mouse moves to any Child control, the Parent control loses the mouse and the shading disappears. unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls; type TForm1 = class(TForm) ParentPanel: TRectangle; Button1: TButton; Label1: TLabel; Label2: TLabel; Rectangle2: TRectangle; Label3: TLabel; procedure ParentPanelMouseEnter(Sender: TObject); procedure ParentPanelMouseLeave(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.fmx} procedure TForm1.ParentPanelMouseEnter(Sender: TObject); begin ParentPanel.Fill.Color := TAlphaColorRec.Red; end; procedure TForm1.ParentPanelMouseLeave(Sender: TObject); begin ParentPanel.Fill.Color := $FFE0E0E0; end; end. FmxDemo.zip
  16. This feature must be used in a separate component. A component must not assign events to other external Components (Controls) or Forms.
  17. Dave, thanks for the advice. But this doesn't work when: - One of the boundaries of the Child control is on the boundary of the Parent control. In this case, if the mouse cursor leaves the Child control at this boundary, it does not trigger the MouseLeave event for the Parent control. - If the mouse cursor moves fast enough, then the MouseLeave event does not have time to arrive in the Parent control, the event goes to some other external control.
  18. Hello If a project has many classes that are defined in different files, and the classes refer to each other, then at a certain stage a compilation error begins to occur: [dcc32 Fatal Error] EhLib.FMX…….pas(19): F2047 Circular unit reference to 'EhLib.FMX……..' To fix this error, you have to shove all the classes into one file and as a result, the project ends up with one huge file that is not convenient to work with. Who is coping with this problem and how?
  19. dmitrybv

    F2047 Circular unit reference.

    If we compare this feature with other programming languages, then, for example, in C# you can separate the implementation of classes in several files and you can declare references to any public classes and any internal classes in the assembly, regardless of in which files the class is declared. Perhaps in Delphi we need to introduce such a concept as an assembly or library, within which classes can refer to each other in the interface part. In general, when developing classes, you want to operate only with such concepts as a library and a class, but you don’t want to think about which file it should be described in so that it can be used in other classes of the library.
  20. dmitrybv

    F2047 Circular unit reference.

    If in unit1 I move a reference to unit2 to the implementation section, then I cannot use classes from unit2 in the interface section of unit1.
  21. dmitrybv

    Global bookmarks

    Is there a plugin for RAD Studio that would allow you to create and search for global bookmarks in all project files like in MS Visual Studio?
  22. dmitrybv

    Global bookmarks

    It looks like Parnassus - Bookmarks has function to bypass all bookmarks in all files, but there is no shortcut assigned to this function by default.
  23. dmitrybv

    Free profiler?

    Does anyone have contact information for the developer of the Sampling Profiler? I did not find contact information on the program website.
×