Jump to content

pete42

Members
  • Content Count

    1
  • Joined

  • Last visited

Posts posted by pete42


  1. 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!

×