Note that there are some explanatory texts on larger screens.

plurals
  1. POunsatisfied forward or external declaration from parent class
    text
    copied!<p>I am creating a custom component that inherits from the TMSFMXGrid. I am developing in Firemonkey using RAD XE3. All works fine except that the style are not correctly applied (I figured the reason for this is because my custom component's parent also inherit the style from a parent class). The basic hierarchy is TMSCustomGrid-> TMSGrid -> MyCustomGrid</p> <p>Doing some research, I figured that the best way to apply the style correctly I need to implement as follow:</p> <pre><code>type MyCustomGrid= class(TTMSFMXGrid) protected function GetClassStyleName: String; override; end; implementation { MyCustomGrid} function TTestGrid.GetClassStyleName: String; begin Result := ClassParent.ClassName + 'style'; Delete(Result, 1, 1); end; </code></pre> <p>This works fine at design time, but at runtime I get the following error : </p> <p>[dcc32 Error] FMX.TMSCustomGrid.pas(505): E2065 Unsatisfied forward or external declaration: 'TTMSFMXCustomGrid.ApplyStyle'</p> <p>Looking at the TMSCustomGrid.pas source file I get the following</p> <pre><code>TTMSFMXCustomGrid = class(TTMSFMXGridData) .... public procedure ApplyStyle; override; .... </code></pre> <p>There is no implementation for ApplyStyle. Also, in my custom component's parent class, this method is not declared.</p> <p>When I go comment out the ApplyStyle procedure in the FMX.TMSCustomGrid.pas source code, everything works fine form my custom components. However, when I create a TMSGrid (which is the parent component of my component) the style is not applied correctly.</p> <p>I am beyond confused. Why does the function GetClassStyleName throw an error about the ApplyStyle procedure? Is there maybe a way to un inherit a method (if that even makes sense???) </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload