Recent

Author Topic: Help with porting package  (Read 2429 times)

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Help with porting package
« on: April 28, 2015, 05:07:52 am »
Hi, I m porting some delphi component and I get the folowing error about Designer.Root.Name., not found.

For example
 
Code: [Select]

...
for j := 0 to Designer.Root.ComponentCount - 1 do...
...
PropInfo := TypInfo.GetPropInfo(Designer.Root.Components[j].ClassInfo, 'Enabled');
...

I see this is refering to form, is there a another way to achieve this using PropEdits and ComponentDesigner units?
Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Help with porting package
« Reply #1 on: April 28, 2015, 08:58:21 am »
I have no idea but designer has a lookuproot property see if that is what you need.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: Help with porting package
« Reply #2 on: April 28, 2015, 10:48:01 am »
I have no idea but designer has a lookuproot property see if that is what you need.

I managed to compile the code using GetDesigner(Form).Name, but thx Im gonna try your advice too.

Right now I m on my work and have a mail server crash :) otherwise I would try instantly

EDIT: I just found that one Delphi code that I converted earlier that instead of Desinger.Root I should put Designer.Form (I think this is pre Delphi6 behaviour) but the class is inherited from TDefaultEditor and that compiles fine. But the class that I try to convert is inherited from PropertyEditor (FPC does'nt have Designer field), maybe somebody had similar problem? I also stubled on this, but I need to go through it:
http://sourceforge.net/p/lazarus-ccr/svn/2456/tree//components/spktoolbar/designtime/SpkToolbarEditor.pas?diff=517ec984271846340a8e495e:2455
)
« Last Edit: April 28, 2015, 11:07:55 am by sin_dragan »
Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

 

TinyPortal © 2005-2018