Prg2Fmg Project
Posted: Fri Oct 14, 2016 10:41 pm
Hi All,
As I promissed I got the first result for your appeciation.
At begining, as I said, there is only one LABEL in the form. Also the form is based as "MAIN" window. Probably to GetFormType will be not problem, but I also believe the most important is to interpret all controls and its properties which is being running at PRG and then to pass onto a FMG file. Normally is gonna take the same form name as FMG file name. But can be changed when exists the same fmg file.
Prg2Fmg is a basic code for at moment, some other controls must be added but I believe that LABEL funcion in it will helps for others controls as reference.
In attached file here are: Prg2Fmg.prg will be used as a library and Demo1.prg it would be considered your source code (PRG file where form is defined). Please note CopyToForm(<Form_Name>) is being called after the WINDOW declared in your PRG (before ACTIVE window).
I have two question at moment to be solved:
1. To find a better way to call this function for fmg be generated.
2. I'm foundin troubles to convert all ACTIONs (normally as CodeBlock) to string. Here's using hb_ValToExp() but its returns is always empty, not bringing the function declared for that action...
Added later (in red):
<Attached file was remove because there is a newer version ahead of this same topic>
How to test it?
You take HMG/IDE and open this Demo1 project and compile. When already runned out the executable, look at "Browser Project" at "Forms" tab and "Refresh Project Window" option at "Project" menu option of IDE. You will note Demo1.Fmg file already created. I should add a message displaying fmg file has been created.
I hope that you have reached the expectation about this project. Seems too easy, simple and I believe to be useful.
Please be free to make your constructive comments.
As I promissed I got the first result for your appeciation.
At begining, as I said, there is only one LABEL in the form. Also the form is based as "MAIN" window. Probably to GetFormType will be not problem, but I also believe the most important is to interpret all controls and its properties which is being running at PRG and then to pass onto a FMG file. Normally is gonna take the same form name as FMG file name. But can be changed when exists the same fmg file.
Prg2Fmg is a basic code for at moment, some other controls must be added but I believe that LABEL funcion in it will helps for others controls as reference.
In attached file here are: Prg2Fmg.prg will be used as a library and Demo1.prg it would be considered your source code (PRG file where form is defined). Please note CopyToForm(<Form_Name>) is being called after the WINDOW declared in your PRG (before ACTIVE window).
I have two question at moment to be solved:
1. To find a better way to call this function for fmg be generated.
2. I'm foundin troubles to convert all ACTIONs (normally as CodeBlock) to string. Here's using hb_ValToExp() but its returns is always empty, not bringing the function declared for that action...
Added later (in red):
<Attached file was remove because there is a newer version ahead of this same topic>
How to test it?
You take HMG/IDE and open this Demo1 project and compile. When already runned out the executable, look at "Browser Project" at "Forms" tab and "Refresh Project Window" option at "Project" menu option of IDE. You will note Demo1.Fmg file already created. I should add a message displaying fmg file has been created.
I hope that you have reached the expectation about this project. Seems too easy, simple and I believe to be useful.
Please be free to make your constructive comments.