Recent

Author Topic: PageControl + SynEdit - PageControl.ActivePage.Free  (Read 9931 times)

BIT

  • Full Member
  • ***
  • Posts: 158
Re: PageControl + SynEdit - PageControl.ActivePage.Free
« Reply #30 on: January 05, 2018, 06:10:14 pm »
It's difficult to me too, understand the english translation. But I think @taazz is right:

I think
the problem has nothing to do with the lcl or its components it has to do with your code. For example, you never check if findcomponent returned nil or not and that is enough to raise a sigsegv. The problem is in your code alone.

I see in your code, you use the name of the component to  obtain the reference:

Code: Pascal  [Select][+][-]
  1. 'syed' + IntToStr(PageControl1.ActivePageIndex + 1)

That's a bad idea. Every time you delete pages, the name of the SynEdit is not yet related to the "PageControl1.ActivePageIndex".

As I told you in other post: You really need to include better error routines in your code.
You really need to include better error routines in your code.  | Google Translator Does not make sense in words ((

BIT

  • Full Member
  • ***
  • Posts: 158
Re: PageControl + SynEdit - PageControl.ActivePage.Free
« Reply #31 on: January 05, 2018, 06:17:16 pm »
One last effort to explain.

Hurray it works !!
Code: Pascal  [Select][+][-]
  1.  if (ActiveControl is TSynEdit) then TSynEdit(ActiveControl).CopyToClipboard;

Now how to get TObject -> TSynEdit?
« Last Edit: January 05, 2018, 06:20:35 pm by BIT »

BIT

  • Full Member
  • ***
  • Posts: 158
Re: PageControl + SynEdit - PageControl.ActivePage.Free
« Reply #32 on: January 05, 2018, 06:38:50 pm »
Forgive me I did not think there lies TSynEdit (ActiveControl)

Thanks big for the help I will go to think now as in SynFacilCompletion to transfer dynamic TSynEdit

 

TinyPortal © 2005-2018