Re: [Lazarus] Dynamic Form Components - SynEdit Help Please...

2016-10-03 Thread Martin Collins via Lazarus
I understand now you've explained it and again slap my face in stupidity. Thank you very much indeed. Much appreciated. 
Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Dynamic Form Components - SynEdit Help Please...

2016-10-03 Thread Martin Collins via Lazarus
Thanks very much. I was googling about dynamically created components and that led me down the path of RTTI, to the point I became confused. Why I didn't see your answer makes me slap my face in stupidity. Thank you very much for your help. Much appreciated.
Martin
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Dynamic Form Components - SynEdit Help Please...

2016-10-03 Thread Martin Frb via Lazarus

See mail from Mattias.

On 03/10/2016 22:17, Martin Collins via Lazarus wrote:


  If IsPublishedProp(Comp, 'Lines') then
  begin
PropInfo := GetPropInfo(Comp, 'Lines', [tkClass]);

SynEdit.Lines is TStrings, not TStringList.


HTMLFile := TStringList(GetObjectProp(Comp, PropInfo, TStrings));
If anything, you get a reference to the SynEdit.LInes object, but you do 
NOT create a new object here




HTMLFile.Free;

So this then is the same as
  SynEdit.Lines.Free;
And that you should not do.

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus