Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 16 of 16 total
Thread Stack overflow
Thu, Jun 27 2013 5:26 AMPermanent Link

Ronald

How do I set this breakpoint? On the right I see "Breakpoints", should I be
seeing a button...?
It is a very interesting view by the way.

"Matthew Jones"  schreef in bericht
news:memo.20130627091216.9092G@nothanks.nothanks.co.uk...

Use Chrome to open it, press F12 to get the debug options, access the source
tab
(IIRC), and find the Form1Create (Ctrl-F works). Then put a breakpoint on
it. Now
open the page again, and step through it. You will see what it is actually
doing,
and how the stack is growing.

/Matthew Jones/
Thu, Jun 27 2013 5:55 AMPermanent Link

Matthew Jones

You click on the line number like in Delphi. There are two source views IIRC, one
is the debug and the other a "file viewer".

/Matthew Jones/
Thu, Jun 27 2013 6:31 AMPermanent Link

Mark Brooks

Slikware

Avatar

Try descending from TPanel rather than TCustomPanel.
I think that'll work.
Thu, Jun 27 2013 10:58 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< I tried to create my own component, based on a TCustompanel. If I create
an instance of my component I get a stackoverflow error (the error is in
Duth, so I hope the translation is correct). This is my (very) basic source
of the component, what is wrong with it? >>

In a nutshell, quite a bit.  If you're going to implement a TCustomPanel
descendant, then you're going to have to at least implement the same methods
that the TPanel component does, or you'll get errors:

  TPanel = class(TCustomPanel)
     private
        class FParts: TCustomPanelParts;
     protected
        function GetThemePrefix: String; override;
        procedure SetThemeParts; override;
        procedure ResetThemeParts; override;
        function GetThemeParts: TControlParts; override;  //  <<<<<<< This
is the one that is causing the stack overflow, because it isn't implemented
     public
        property Dock;
     end;

If you want just a straight-up blank container control, then don't inherit
from TCustomPanel, rather inherit from TContainerControl.  TContainerControl
does not have any theming at all, and is just a simple container control
with an outside container element and an inside client element (both the
same size, by default).

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com


Thu, Jun 27 2013 11:02 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< I thought that too, however I think Tim may have fixed this, primarily
because my code uses "Self" in this scenario all over the place and it works
just fine. I am running 1.02B1. >>

The issue has always been with using the unit-wide Form1 variable *instead
of* Self:

http://www.elevatesoft.com/supportfaq?action=view&category=ewb&question=accessing_form_variable_oncreate_event_handler

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 28 2013 6:28 AMPermanent Link

Ronald

Thanks, I now use TPanel as my base and that works fine.

"Ronald"  schreef in bericht
news:8652475C-6024-4BA0-8921-B44D144E6EAB@news.elevatesoft.com...

Hi,

I tried to create my own component, based on a TCustompanel. If I create an
instance of my component I get a stackoverflow error (the error is in Duth,
so I hope the translation is correct).
This is my (very) basic source of the component, what is wrong withit?

unit cells;

interface

uses WebCore,WebCtrls;

type
TCell = class(TCustomPanel)
  private
  public
  constructor Create(AOwner: TComponent); override;
  destructor Destroy; override;
  end;

implementation

constructor TCell.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;


destructor TCell.Destroy;
begin
inherited Destroy;
end;

end.

Thanks,
Ronald
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image