Fixing inherited vs object in .fmx files
If you use visual inheritance, especially with frames, the IDE may occasionally leave the .fmx file in an incorrect state, changing inherited to object. This can cause the following error:
The inherited keyword tells the component streaming system that the root object derives from an ancestor definition, whereas object describes it as a regular streamed object.
To fix the issue, close the project, open the .fmx file in a text editor, and change object back to inherited.
For example, I encountered this issue with ArticlesView. I changed ArticlesView.fmx from:
object ArticlesView: TArticlesView
Size.Width = 209.000000000000000000
Size.Height = 443.000000000000000000
object Scroller: TVertScrollBox
Align = Client
Margins.Top = 8.000000000000000000
Size.Width = 209.000000000000000000
Size.Height = 435.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Viewport.Width = 209.000000000000000000
Viewport.Height = 435.000000000000000000
end
end
to:
inherited ArticlesView: TArticlesView
Size.Width = 209.000000000000000000
Size.Height = 443.000000000000000000
object Scroller: TVertScrollBox
Align = Client
Margins.Top = 8.000000000000000000
Size.Width = 209.000000000000000000
Size.Height = 435.000000000000000000
Size.PlatformDefault = False
TabOrder = 0
Viewport.Width = 209.000000000000000000
Viewport.Height = 435.000000000000000000
end
end