Board index » delphi » DFM Parser logic

DFM Parser logic


2006-06-28 12:55:22 PM
delphi137
Hi,
Not sure if I should ask this question on this news group. Please guide me
the correct NG in case, this question is not appropriate.
I am looking for some "logoc" to parse DFM file and find out some property
value set for a given component should it be declared in the DFM file.
Please let me know if anyone is aware of such logic or source code...
regards
Baliga
 
 

Re:DFM Parser logic

Baliga, Narasimha writes:
Quote
I am looking for some "logoc" to parse DFM file and find out some property
value set for a given component should it be declared in the DFM file.
Please let me know if anyone is aware of such logic or source code...
Look in Classes.pas for TParser which can be used to parse DFM files.
There is an example of how to use it in Classes.pas as well.
Erik
 

Re:DFM Parser logic

Hi,
You could check out our Pascal Analyzer product, which you can get from
www.peganza.com
Among the 40+ reports generated by Pascal Analyzer from your source code,
there are two that could be useful for you:
Property Value Report - reports values for selected properties of selected
components
Missing Property Report - reports missing properties for selected components
You can download an evaluation version of Pascal Analyzer at our site. Even
though the evaluation version has limitations, these two reports are not
limited in any way.
Regards
Christer
Peganza Software
"Baliga, Narasimha" <XXXX@XXXXX.COM>writes
Quote
Hi,

Not sure if I should ask this question on this news group. Please guide
me the correct NG in case, this question is not appropriate.

I am looking for some "logoc" to parse DFM file and find out some property
value set for a given component should it be declared in the DFM file.
Please let me know if anyone is aware of such logic or source code...

regards
Baliga


 

Re:DFM Parser logic

Hello Narasimha,
Quote
I am looking for some "logoc" to parse DFM file and find out some
property value set for a given component should it be declared in the
DFM file. Please let me know if anyone is aware of such logic or
source code...
Have a look at the objHierarchy.pas (www.delphipraxis.net/topic62373,0,asc,0.html).
The provided classes allow you to traverse an object composite regardless
where it comes from. One of the builders provided can parse DFMs another
can be used to reflect true existent objects.
Although the link provided is german the unit itself is commented in english.
Regards,
Heiko Behrens
 

Re:DFM Parser logic

might be useful...
cc.borland.com/Item.aspx
 

Re:DFM Parser logic

Baliga, Narasimha writes:
Quote
Hi,

Not sure if I should ask this question on this news group. Please
guide me the correct NG in case, this question is not appropriate.

I am looking for some "logoc" to parse DFM file and find out some
property value set for a given component should it be declared in the
DFM file. Please let me know if anyone is aware of such logic or
source code...

To be honest, you can use TReader in Classes.pas. Outlined in the
ObjectBinaryToText function, you can see how the DFM is parsed by the
IDE.
--
 

Re:DFM Parser logic

Eddie Shipman writes:
Quote
To be honest, you can use TReader in Classes.pas. Outlined in the
ObjectBinaryToText function, you can see how the DFM is parsed by the
IDE.

i basically followed this logic when writing my parser.
but once you have that in a tree structure its easy to navigate.
i should mention too that codewrench will get symbol info from the dfm and the pas file.
www.codewrench.org
 

Re:DFM Parser logic

Charles McAllister writes:
Quote
might be useful...
cc.borland.com/Item.aspx
I have tried to install JVCL 3.2
The included installer does not show any IDE selected by default.
Also the listed IDE are unchecked and disabled though I have Delphi 7 and D2006 installed on my PC
Any ideas?
Thanks,
Sarah
 

Re:DFM Parser logic

Sarah writes:
Quote
I have tried to install JVCL 3.20
The included installer does not show any IDE selected by default.
I have then tried to install JCL first and got the below error:
---------------------------
JEDI Installer
---------------------------
Unable to open key "SOFTWARE\Borland\BDS\3.0\Personalities" for read.
---------------------------
OK
---------------------------
Then the installer shows up with this error:
---------------------------
JEDI Installer
---------------------------
Access violation at address 00419D58 in module 'JediInstaller.exe'. Read of address 00000004.
---------------------------
OK
---------------------------
"The HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\3.0" key is empty on my PC
Instead, I have the below entry existing:
"HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\4.0\Personalities"
How to make this installer using the "BDS\4.0\" instead of "\BDS\3.0\"?
Regards,
Sarah
 

Re:DFM Parser logic

Sarah writes:
Quote
"The HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\3.0" key is empty on my PC

Instead, I have the below entry existing:
"HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\4.0\Personalities"

How to make this installer using the "BDS\4.0\" instead of "\BDS\3.0\"?
Ok, I have removed that "\3.0" (empty) node from registry and the installers worked fine!
Regards,
Sarah