Como funciona _HMG_SYSDATA[...]

HMG en Español

Moderator: Rathinagiri

Post Reply
Leopoldo Blancas
Posts: 387
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 3 times
Been thanked: 9 times

Como funciona _HMG_SYSDATA[...]

Post by Leopoldo Blancas » Thu Mar 28, 2019 7:25 pm

Hola a todos.

Ya que empece a revisar los ejemplos, para empezar a acostumbrarme a programar con HMG, veo en el ejemplo de MAIN_AUTOAJUST que utilizan la "variable" _HMG_SYSDATA[ 91, i ], _HMG_SYSDATA[67], etc. Me imagino que es una variable Publica y que ya tiene especificado ciertos parámetros, pero que significa o a que se refiere el 67 o el 91,i de la variable, donde lo puedo consultar?
También veo en los archivos PRG de los controles de la carpeta SOURCE que utilizan la variable _HMG_SYSDATA[...], es por eso mi interés y creo que es sumamente IMPORTANTE, ya que creo que para sacar un mayor provecho de HMG tengo que comprender a _HMG_SYSDATA[...].

Se que a lo mejor es extensa la explicación, pero si alguien es tan amable de explicarme paso por paso para poderla comprender se los agradecería mucho.

Gracias de antemano.
------------------------------------------------------------------------------------------------------------------------------------------------
Hi all.

As I started to review the examples, to start getting used to programming with HMG, I see in the MAIN_AUTOAJUST example that they use the "variable" _HMG_SYSDATA [91, i], _HMG_SYSDATA [67], etc. I imagine that it is a Public variable and that it has already specified certain parameters, but what does it mean or does it refer to 67 or 91, i of the variable, where can I consult it?
I also see in the PRG files of the SOURCE folder controls that use the _HMG_SYSDATA variable [...], that's why I am interested and I think it is extremely IMPORTANT, since I think that to get more out of HMG I have to understand a _HMG_SYSDATA [...].

I know that perhaps the explanation is extensive, but if someone is kind enough to explain me step by step so I can understand, I would greatly appreciate it.

Thanks in advance.

User avatar
mol
Posts: 3154
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 200 times
Been thanked: 107 times
Contact:

Post by mol » Thu Mar 28, 2019 9:47 pm

You can analyze sources of hmg to know what is the content of _hmg_sysdata

Leopoldo Blancas
Posts: 387
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 3 times
Been thanked: 9 times

Post by Leopoldo Blancas » Thu Mar 28, 2019 11:21 pm

mol wrote:
Thu Mar 28, 2019 9:47 pm
You can analyze sources of hmg to know what is the content of _hmg_sysdata
Thanks Mol, I'll check.
Someone with another idea?
Greetings.

Leopoldo Blancas
Posts: 387
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 3 times
Been thanked: 9 times

Post by Leopoldo Blancas » Fri Mar 29, 2019 1:54 am

Por más que le doy vueltas de arriba abajo a los PRG, no me queda claro...
en h_TextBox.prg
MemVar _HMG_SYSDATA
.............
y de repente:
if _HMG_SYSDATA [ 264 ] = .T.
En que momento se le dio el valor a _HMG_SYSDATA [ 264 ] = .T. o if _HMG_SYSDATA [ 264 ] = .F.
.....................................................................
k := _GetControlFree()

Public &mVar. := k
_HMG_SYSDATA [1] [k] := if( lNumeric, "NUMTEXT", "TEXT" )
_HMG_SYSDATA [2] [k] := cControlName
_HMG_SYSDATA [3] [k] := nControlHandle
_HMG_SYSDATA [4] [k] := nParentForm
_HMG_SYSDATA [ 5 ] [k] := 0
_HMG_SYSDATA [ 6 ] [k] := ""
_HMG_SYSDATA [ 7 ] [k] := Field
_HMG_SYSDATA [ 8 ] [k] := nil
_HMG_SYSDATA [ 9 ] [k] := ""
_HMG_SYSDATA [ 10 ] [k] := uLostFocus
_HMG_SYSDATA [ 11 ] [k] := uGotFocus
_HMG_SYSDATA [ 12 ] [k] := uChange
_HMG_SYSDATA [ 13 ] [k] := .F.
_HMG_SYSDATA [ 14 ] [k] := backcolor
_HMG_SYSDATA [ 15 ] [k] := fontcolor
_HMG_SYSDATA [ 16 ] [k] := uEnter
_HMG_SYSDATA [ 17 ] [k] := {}
_HMG_SYSDATA [ 18 ] [k] := ny
_HMG_SYSDATA [ 19 ] [k] := nx
_HMG_SYSDATA [ 20 ] [k] := nwidth
_HMG_SYSDATA [ 21 ] [k] := nheight
_HMG_SYSDATA [ 22 ] [k] := 0
_HMG_SYSDATA [ 23 ] [k] := iif ( _HMG_SYSDATA [ 183 ] > 0 ,_HMG_SYSDATA [ 333 ] [_HMG_SYSDATA [ 183 ]] , -1 )
_HMG_SYSDATA [ 24 ] [k] := iif ( _HMG_SYSDATA [ 183 ] > 0 ,_HMG_SYSDATA [ 334 ] [_HMG_SYSDATA [ 183 ]] , -1 )
_HMG_SYSDATA [ 25 ] [k] := ""
_HMG_SYSDATA [ 26 ] [k] := 0
_HMG_SYSDATA [ 27 ] [k] := cfontname
_HMG_SYSDATA [ 28 ] [k] := nfontsize
_HMG_SYSDATA [ 29 ] [k] := {bold,italic,underline,strikeout}
_HMG_SYSDATA [ 30 ] [k] := ctooltip
_HMG_SYSDATA [ 31 ] [k] := cParentTabName
_HMG_SYSDATA [ 32 ] [k] := 0
_HMG_SYSDATA [ 33 ] [k] := ''
_HMG_SYSDATA [ 34 ] [k] := .Not. invisible
_HMG_SYSDATA [ 35 ] [k] := HelpId
_HMG_SYSDATA [ 36 ] [k] := FontHandle
_HMG_SYSDATA [ 37 ] [k] := 0
_HMG_SYSDATA [ 38 ] [k] := .T.
_HMG_SYSDATA [ 39 ] [k] := 0
_HMG_SYSDATA [ 40 ] [k] := { NIL , NIL , NIL , NIL , NIL , NIL , NIL , NIL , NIL , NIL , NIL , NIL }

_HMG_SYSDATA [ 40 ] [k] [ 9 ] := DISABLEDBACKCOLOR
_HMG_SYSDATA [ 40 ] [k] [ 10 ] := DISABLEDFONTCOLOR
_HMG_SYSDATA [ 40 ] [k] [ 11 ] := readonly

Aquí supongo que le pasa parametros a _HMG_SYSDATA y puedo deducir que ahí guarda esos valores.... pero que pasa con if _HMG_SYSDATA [ 264 ] = .T.
En que momento se le dio el valor a _HMG_SYSDATA [ 264 ] = .T. o if _HMG_SYSDATA [ 264 ] = .F.

_HMG_SYSDATA es un ARRAY???????

Public &mVar. := k 'QUÉ SIGNIFICA ESTA FRACCIÓN DE CÓDIGO???

Alguna idea?, POR FAVOR.

GRACIAS.
------------------------------------------------------------------------------------------------------------------------------------------------
As much as I give the PRG up and down, it's not clear to me ...
in h_TextBox.prg
MemVar _HMG_SYSDATA
.............
and suddenly:
if _HMG_SYSDATA [264] = .T.
At what time the value was given to _HMG_SYSDATA [264] = .T. or if _HMG_SYSDATA [264] = .F.
.................................................. ...................
k: = _GetControlFree ()

Public & mVar. : = k
_HMG_SYSDATA [1] [k]: = if (lNumeric, "NUMTEXT", "TEXT")
_HMG_SYSDATA [2] [k]: = cControlName
_HMG_SYSDATA [3] [k]: = nControlHandle
_HMG_SYSDATA [4] [k]: = nParentForm
_HMG_SYSDATA [5] [k]: = 0
_HMG_SYSDATA [6] [k]: = ""
_HMG_SYSDATA [7] [k]: = Field
_HMG_SYSDATA [8] [k]: = nil
_HMG_SYSDATA [9] [k]: = ""
_HMG_SYSDATA [10] [k]: = uLostFocus
_HMG_SYSDATA [11] [k]: = uGotFocus
_HMG_SYSDATA [12] [k]: = uChange
_HMG_SYSDATA [13] [k]: = .F.
_HMG_SYSDATA [14] [k]: = backcolor
_HMG_SYSDATA [15] [k]: = fontcolor
_HMG_SYSDATA [16] [k]: = uEnter
_HMG_SYSDATA [17] [k]: = {}
_HMG_SYSDATA [18] [k]: = ny
_HMG_SYSDATA [19] [k]: = nx
_HMG_SYSDATA [20] [k]: = nwidth
_HMG_SYSDATA [21] [k]: = nheight
_HMG_SYSDATA [22] [k]: = 0
_HMG_SYSDATA [23] [k]: = iif (_HMG_SYSDATA [183]> 0, _HMG_SYSDATA [333] [_HMG_SYSDATA [183]], -1)
_HMG_SYSDATA [24] [k]: = iif (_HMG_SYSDATA [183]> 0, _HMG_SYSDATA [334] [_HMG_SYSDATA [183]], -1)
_HMG_SYSDATA [25] [k]: = ""
_HMG_SYSDATA [26] [k]: = 0
_HMG_SYSDATA [27] [k]: = cfontname
_HMG_SYSDATA [28] [k]: = nfontsize
_HMG_SYSDATA [29] [k]: = {bold, italic, underline, strikeout}
_HMG_SYSDATA [30] [k]: = ctooltip
_HMG_SYSDATA [31] [k]: = cParentTabName
_HMG_SYSDATA [32] [k]: = 0
_HMG_SYSDATA [33] [k]: = ''
_HMG_SYSDATA [34] [k]: = .Not. invisible
_HMG_SYSDATA [35] [k]: = HelpId
_HMG_SYSDATA [36] [k]: = FontHandle
_HMG_SYSDATA [37] [k]: = 0
_HMG_SYSDATA [38] [k]: = .T.
_HMG_SYSDATA [39] [k]: = 0
_HMG_SYSDATA [40] [k]: = {NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL, NIL}

_HMG_SYSDATA [40] [k] [9]: = DISABLEDBACKCOLOR
_HMG_SYSDATA [40] [k] [10]: = DISABLEDFONTCOLOR
_HMG_SYSDATA [40] [k] [11]: = readonly

Here I suppose that it passes parameters to _HMG_SYSDATA and I can deduce that there it stores those values ​​.... but what happens with if _HMG_SYSDATA [264] = .T.
At what time the value was given to _HMG_SYSDATA [264] = .T. or if _HMG_SYSDATA [264] = .F.

_HMG_SYSDATA is an ARRAY ???????

Public & mVar. : = k WHAT DOES THIS CODE FRACTION MEAN ???

Any ideas ?, PLEASE.

THANK YOU.
 

User avatar
mol
Posts: 3154
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 200 times
Been thanked: 107 times
Contact:

Post by mol » Fri Mar 29, 2019 6:45 am

This array contains every defined controlds.
k variable is index of new created conttol and _hmg_sysdata[k] contains its properties.

Leopoldo Blancas
Posts: 387
Joined: Wed Nov 21, 2012 7:14 pm
Location: México
Has thanked: 3 times
Been thanked: 9 times

Post by Leopoldo Blancas » Fri Mar 29, 2019 4:21 pm

mol wrote:
Fri Mar 29, 2019 6:45 am
This array contains every defined controlds.
k variable is index of new created conttol and _hmg_sysdata[k] contains its properties.
Thanks Mol, if that's what I thought, but I think it will take me some time to understand how it is possible to define it at the beginning with MemVar and already "Contain" parameters set in another procedure ... It seems it's a Public Array, I think .

Yes, I also realize that _hmg_sysdata [k], corresponds to the free control number, and in each one _hmg_sysdata [n] [k] represents a particular parameter of that control, but when _hmg_sysdata appears [244] I do not know that Parameter refers ... and that makes me lose myself in the logic of the Program. Thanks for reponder Mol
--------------------------------------------------------------------------------------------------------------------------------------------------
Gracias Mol, si es lo que supuse, pero creo que me va a llevar tiempo comprender como es posible que lo definan al inicio con MemVar y ya "Contenga" parametros puestos en otro procedimeinto... Al parecer es un Array Publico, eso creo.

Si, tambien me doy cuenta que _hmg_sysdata[k], corresponde al número de control libre, y en cada uno _hmg_sysdata[n][k] representa un parametro en particular de dicho control, pero cuando aparece _hmg_sysdata[244] pues no se que parametro se refiere... y eso hace que me pierda en la logica del Programa. Gracias por reponder Mol

Post Reply