pete42 0 Posted May 25, 2023 Can anyone tell me if this causes a stack overflow? unit FMX.Controls; function TStyleBook.GetStyle(const Context: TFmxObject): TFmxObject; var Idx: Integer; begin Idx := StyleIndexByContext(Context); if Idx >= 0 then Result := Styles[Idx].Style else Result := Style; <<< This Property call results in an infinite GetStyle call?! end; Thanks! Share this post Link to post
programmerdelphi2k 237 Posted May 25, 2023 51 minutes ago, pete42 said: This Property call results in an infinite GetStyle call?! FMX.Controls.pas, line 1180 (RAD11.3) -> property Style: TFmxObject read GetStyle; then, yes! a infinity looping if "(Idx<0)" 🙂 Share this post Link to post