Prg2Fmg Project

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Prg2Fmg Project

Post by Pablo César »

Hi all,

I came back to the house and when I say this is regarding posting/publishing messages again in the forum because I needed much to have contact with all of you. I always kept in touch everyday reading posts. ;) Really, It was but the common feeling: love to HMG.

I was full of ideas but all in my mind... :| but now I feel strong again and I wish to share all with you. :) So I wish to work on HMG...

I will speak according my programming habits. I use a lot the HMG IDE. It's good tool but I wish some more...

I noticed that there is a lot of code (including many mine too) we do not use of FMG files. Instead, many of us put into our PRGs.

This sometimes causes some difficulties when we need to make reposition's controls. Hence we need to change the PRGS and compile all the time to see the result. This take more time, it's not practical... :|

But I got the main idea of FMG_Editor which loads in the fly (at runtime) the FMG file. But for this project it is the opsite idea: to read controls property into the memory (this is already in HMG, by _HMG_SYSDATA and GetProperty function) and then create FMG file.

So I would like to make this project and would like to receive some help.
How to help ?
I would start with one control and convert into FMG file but I will need others to help to complete the rest of HMG's controls.

What do you think ? Can I count with you ?

There is another question. I wish to have it (if it is possible/approved) at HMG core. I do not know how we could make trigger of these new library for PRG2FMG. Any idea ?
Last edited by Pablo César on Tue Oct 11, 2016 5:11 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Prg2Fmg Project

Post by serge_girard »

Hi Pablo, How can we help?


Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Prg2Fmg Project

Post by Pablo César »

Thank you Serge for your usual altruism and interest for this matter.

I need to take the second step. First I would prepare to take a form made in PRG with one control declared and runnable (lets say a LABEL one). Then by calling a function which be responsable to convert from properties been read from memory environment and be written to a selected FMG file.

With this same sample will be required the precious help from others with other controls.
Do you got it ? Can I count with you at least for one control ??? :P
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Prg2Fmg Project

Post by mol »

Sorry for my criticism, dont' treat it personally, Pablo, but, in my oponion, such a project will be useful for converting hmg samples only...
I'm using IDE, but sometimes it's easier to define window by coding it. Especially when some features of controls change upon some cases...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Prg2Fmg Project

Post by Pablo César »

mol wrote:Sorry for my criticism, dont' treat it personally, Pablo
Ok Marek, but please let understand some more for what you said...
mol wrote:but, in my oponion, such a project will be useful for converting hmg samples only...
I'm using IDE, but sometimes it's easier to define window by coding it.
You mean will probably not useful in your daily work ? But you said you make use of IDE... :?

I think is a good thing when you do not need to mess in your PRGs at all. But we know this is not a garantee in our lifes. With this proposed app, would it be used to create a fmg file from just reading the declared controls and form inside from your prg. Then this fmg you can manage as you want into HMG IDE and also you can read again from View/Form Code and paste at your prg as you ever be done. Do you got it ?

I think Prg2Fmg will not be useful when you make dynamic control when create at your PRG.

But this proposed app, I think would be useful.
Any changing of position from you ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Prg2Fmg Project

Post by dragancesu »

Does that mean that there would be a run-time that would read prg and performed it?

It is a good concept but it is not easy to make, so doing oracle forms, make the form, compiled and performed runform

This gives great flexibility, the modules are independent and can be changed in order to not affect the rest

That is not easily
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Prg2Fmg Project

Post by Pablo César »

Hi Dragan, thanks for your interest.
dragancesu wrote:Does that mean that there would be a run-time that would read prg and performed it?
That's the intention. But no thru executable, yes by adding/triggering
Dragan wrote:It is a good concept but it is not easy to make, so doing oracle forms, make the form, compiled and performed runform
Imagine that would be posible to make reverse coding by running a function a get a form file immediately. That will be useful when you need to change controls position in the form designer of HMG/IDE.
Dragan wrote:This gives great flexibility, the modules are independent and can be changed in order to not affect the rest
I do not yet how to make trigger with the function. I would like some like as REQUIRE... or include... only to execute once you need a fmg file for editing/using at IDE.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Prg2Fmg Project

Post by dragancesu »

Maybe some precompiler prg to prx, it was to check the syntax of a control example
LABEL converted into hmg_run ( 'LABEL' par1, par2, ..., pars)
TEXTBOX in hmg_run ( 'TEXTBOX' par1, par2, par3 ... pars)
naturally encoded bit that can not be changed but only ordinary editor

Function hmg_run it should interpret and do so then applications were RUNHMG main.prx

Nothing special, like FoxPro early versions
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Prg2Fmg Project

Post by Pablo César »

Sorry, I am deeply in sad at this moment, I hope to receive a good new for Claudio stay.

I tried to start already but not conditions at moment, all is in my mind. But I believe that we'll not need to check syntax of control. Once the control is working properly with the source code already compiled and approved by the builder.
The text be generated will be quite similar or let say strictly same than fmg files done by HMG/IDE.

I think at begining we'll just call a function Prg2Fmg to generate fmg file with same name of WINDOW/form.

Thanks Dragan for your interest.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Post Reply