FMG_View - HMG form utility

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

FMG_View - HMG form utility

Post by Pablo César »

Hi All,

When recently I've started with Prg2Fmg project I saw that I could do nothing with respect to CodeBlocks... I mean deserialization case of Harbour restriction/impossibility. But then I've remembered that I have been successful at FMG_Editor project where it's possibe to open FMG on the runtime ("on the fly", dynamically) without any prior compilation/rebuilding of any. Just execute FMG_View.exe.
You'll find two ways: executing app by clicking or by typing at prompt command with one parameter (name of fmg file, with or without extension) and you can inform with path where fmg will be.

Example:
FMG_View C:\hmg.3.4.3\SAMPLES\Controls\ToolBar\TOOLBAR\toolbar.fmg
I've tested with "normal" fmg files from SAMPLES. Prg2Fmg recognize at comments of fmg files when is ooHG or HMG Extended and advise to user. Also works with Standard Syntax (xBase Style) in fmg files, accepts EOC (EndOfCommand) with ";" character at end of each line, which pass from concatenation procedure too. :)

The question was: what to do with the ACTION properties and what to do with functions no be present in the fmg file?

The answer is: Simple to derogate all ACTIONs by displaying with MsgInfo.

In FMG_View all forms al treated as MAIN. Probably this could be changed but I think for displaying only it's good enough.

Also detect when is ANSI or UNICODE format in FMGs.

There are other functions but not used, it only serves as inspiration to other applications.
If you want, can use as you wish and I accept suggestions but if there are any errors in the app execution, I would like that be largely explained what were the tests. Preferably, please attach the FMG file.

This application will serve as a basis for Prg2Fmg project too. ;)

<Attached files were removed because there is a newer version ahead of this same topic.>

FMG_View has not screens to be displayed. The screen wiil be your form and controls. :)

I hope you enjoy! :D
Last edited by Pablo César on Fri Oct 28, 2016 11:44 am, 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: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: FMG_View - HMG form utility

Post by serge_girard »

Thx Pablo !

Serge
There's nothing you can do that can't be done...
User avatar
quartz565
Posts: 667
Joined: Mon Oct 01, 2012 12:37 pm
Location: Thessaloniki, Greece
Contact:

Re: FMG_View - HMG form utility

Post by quartz565 »

Thank you Pablo !
Best Regards,
Nikos.

os: Windows Server 2019 - 64
User avatar
Steed
Posts: 427
Joined: Sat Dec 12, 2009 3:40 pm

Re: FMG_View - HMG form utility

Post by Steed »

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

FMG_View - HMG form utility

Post by Pablo César »

Thank you guys for your interest in it. :)

Second version released with these changes:

- Conditional compilation. This is to use FMG_View as an app or as part of library in other project. This is good when we want keep two project or more in separated.

- Third optional parameter for window type. This must be flexible when execute inner other forms.

- Remove variables not in use, clean up and organize the code sequence.

<Source codes and executable files were removed because there is a updated version ahead of this topic>
Last edited by Pablo César on Wed Nov 02, 2016 5:43 pm, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: FMG_View - HMG form utility

Post by mustafa »

Gracias amigo
Thank you Pablo !

Mustafa
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: FMG_View - HMG form utility

Post by mustafa »

Hola Pablo
Magnifica aplicación, una pregunta ?
Yo, como viejo "Dinosaurio de Clipper" ... je..je..
No utilizo los Ficheros "FMG" construyo el código a golpe de Editor
ya se que es más fatigoso, pero para mi es más cómodo.
La pregunta es ? FMG_View serviría para ejecutar directamente Prg.
Gracias por tu atención
saludos
Mustafa
*------------------------------------- Google -----------------------------------*
Hi, Pablo
Magnifica application, a question?
I, as an old "Dinosaur Clipper" ... je..je ..
I do not use Files "FMG" build the code to hit Editor
I know it's already more tiring, but for me it is more comfortable.
The question is ? FMG_View serve to run directly Prg.
Thanks for your attention
regards
Mustafa
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

FMG_View - HMG form utility

Post by Pablo César »

Hola Mustafa,

Gracias por tu interés y lindas palabras.

Sé que para todo viejo Clippero (como yo), se nos hace dificil (al comienzo) salir de nuestra zna de conforto para algo nuevo y que no dominamos. Pero te puedo asegurar amigo que el uso de IDE en la confeccion de los pantallas/formularios se hace verdaderamente más fácil para posicionar los controles, verificar el estilo, tamaños y agregar los eventos que se desee de forma práctica y con mejor resultado estético (digamos).

Yo acostumbro a idealizar primeramente en la cabeza con las ideas de lo que poderia tener, a veces transpaso todo en un papel, dibujando las pantallas y anotando detalles. Luegovoy para el "form designer" (HMG/IDE) para poner manos a la ora. Una vez que quedó esteticamente en conformidad, adiciono los eventos. Luego transpaso el código fuente (source code) del formulário (que está en archivo FMG), lo puedo hacer abrindolo por editor de textos o por la IDE y voy selecionando los componentes para dentro de mi PRG. Ctrl-C y Ctrl-V son utilizados.
Si no sabes traspasar el código de los fmg para tu prg através de la IDE, hacé lo siguiente:
Después de abrir el Form. en la IDE (y si la pones en español) verás en el menu Ver clicando verás "Codigo del formulario" y abrirá una ventana con el código fuente que puedes selecionarlo con el mouse y despues ya sabes con el uso de Ctrl-C y vás a tu editor con Ctrl-V y tendrás el código.

De esta forma, evitarias estar intentando a toda hora para deslocar, posicionamientos, tamaños y colores o fuentes no deseadas. Por consecuente evitar gasto de tiempo en estética. Siendo que por la IDE ya queda listo.

Además yo uso mi aplicativo ViewError.exe de ediccion, exibiendo los errores de compilacion, abriendome el PRG que dió el error, en la linea donde está el error. Eso me dá más dinamismo y facilita la compilación porque corrijo y ya vuelo a compilarlo por la IDE.
Detalles sobre el Build.bat and ViewError - installation procedure (ver en este link).

Como trabajo mucho con la IDE, hice este aplicativo para suplementar carencias de la propia IDE, ya que no posuimos los código fuentes al público y por lo tanto, no podemos auxiliar en mejoras con la IDE (solo atravéz del Wishing List).

Entonces este nuevo aplicativo FMG_View sirve para visualizar los archivos con extension FMG que son creados por la IDE del HMG cuando elaboras un form. Entonces esta aplicacion auxilia para no tener que abrir el proyecto y visualizarlo por la IDE. Tambien estes mismos recursos irá servir para complementar otro proyecto: el Prg2Fmg que irá hacer todo lo opuesto sobre el procedimiento que te expliqué sobre "traspasar el código de los fmg". Es decir: desde tu aplicacion hecho a mano ejecutando el Prg2Fmg irá crear el FMG conforme lo que está en tu PRG.

Creo que esta es una buena oportunidad para ti crear los FMGs (archivos form) ya que solo lo tienes en PRGs.
mustafa wrote:FMG_View serviría para ejecutar directamente Prg.
Entonces respondiendo a tu pregunta. No, es solo para abrir los archivos FMG.

Yo empezé el otro proyecto Prg2Fmg primero y encontré gran dificultad por no tener listo este FMG_View. El Prg2Fmg, si es para utilizarlo junto con tu PRG (para compilarlo, apenas una vez), solo para generar los archivos form (fmg) que no tendrias o estarian desactualizados. Eso si te interesa utilizar la IDE/HMG. ;)

Es un verdadero gusto atenderte, amigo. :P


Googled
Hi Mustafa,

Thank you for your interest and nice words.

I know that for all old Clippero (like me), it becomes difficult (to start) out of our zna of comfort for something new and that can not read. But I can assure friend using IDE in the making of the screens/forms is truly easier to position controls, check the style, size and add events you want in a practical and better cosmesis (say ).

I tend to idealize first in the head with ideas of what poderia have sometimes transpaso everything down on paper, drawing screens and scoring details. Luegovoy for the "form designer" (HMG/IDE) to get down to pray. Once it was esthetically accordingly, events added. Then transpaso the source code (source code) of the form (which is on file FMG), I can do abrindolo by text editor or IDE and I selecionando the components within my PRG. Ctrl-C and Ctrl-V are used.
If you do not know transfer code of FMG for your prg using the IDE, I do the following:
After opening the Form. in the IDE (and if you put it in Spanish) see on the menu View clicking see "Form Code" and open a window with the source code you selecionarlo with the mouse and then you know using Ctrl-C and go to your editor with Ctrl-V and have the code.

In this way, you would avoid at all times be trying to deslocar, positions, sizes and colors or unwanted sources. By consistently avoid spending time in aesthetic. Since the IDE and is ready.

I also use my application ViewError.exe at compiling during my editions, exhibiting any compilation errors, opening the PRG that gave the error in the line where the error is. That gives me more dynamism and facilitates the compilation because I correct and as flight to compile the IDE.
Details on the Build.bat and ViewError - installation procedure (see this link).

As work a lot with the IDE, I made this application to supplement shortcomings of the IDE itself, since we do not posuimos the source code to the public and therefore can not assist in improvements to the IDE (atravez only the Wishing List).

Then this new application FMG_View used to display files with extension FMG that are created by the IDE when you elaborate one HMG form. Then this application helps to avoid having to open the project and display the IDE. Same resources will also're used to complement another project: Prg2Fmg that will do the opposite of the procedure you explained about "transfer code of FMG ". That is, from your handmade application running Prg2Fmg it will create the FMG as what is in your PRG.

I think this is a good opportunity for you to create the FMGs (file form) as only have it in PRGs.
mustafa wrote:FMG_View serve to run directly Prg.
So to answer your question. No, it is only to open the files FMG.

I started another project Prg2Fmg first great difficulty and found not to have ready this FMG_View. The Prg2Fmg, if it is for use with your PRG (to compile it, just once), only to generate the form files (FMG) or you would not have They would be outdated. So if you are interested in using the IDE/HMG. ;)

It is a true pleasure assist you, friend. :P
Last edited by Pablo César on Sat Oct 29, 2016 3:48 pm, edited 6 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
mustafa
Posts: 1158
Joined: Fri Mar 20, 2009 11:38 am
DBs Used: DBF
Location: Alicante - Spain
Contact:

Re: FMG_View - HMG form utility

Post by mustafa »

Pablo : Ole !!! Ole !!!
Que explicación más detallada gracias amigo
un abrazo
Mustafa
ASESORMIX
Posts: 192
Joined: Thu Oct 25, 2012 8:08 pm
Location: Bqto, Venezuela

Re: FMG_View - HMG form utility

Post by ASESORMIX »

Fabuloso este trabajo amigo Pablo Cesar.
Muchas gracias por compartirlo.
Post Reply