Hi Dr. Claudio & Friends
I'm testing most of my frequently used routines and applications with new 3.30 & patch.-
I've discover an extrange behaviour in this sample.- Under 3.15 compilation works fine, under 3.30 all application becomes mad, really mad.-
I've attach an zip file containing both exe (3.15 compiled & 3.30 with patch compiled).- Source code is unique for both.-
With regards. Eduardo.
Events in the new version
Moderator: Rathinagiri
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Events in the new version
- Attachments
-
- mouse_over_2.rar
- Source files
- (1.19 KiB) Downloaded 547 times
-
- mouse_over_version_2_COMPILED_WITH_330.rar
- Executable file (3.3.0)
- (1.04 MiB) Downloaded 557 times
-
- mouse_over_version_2_COMPILED_WITH_315.rar
- Executable file (3.1.5)
- (819.66 KiB) Downloaded 560 times
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
HMG 3.3.0 (Stable) Patch 1
Hola Eduardo,EduardoLuis wrote:Hi Dr. Claudio & Friends
I'm testing most of my frequently used routines and applications with new 3.30 & patch.-
I've discover an extrange behaviour in this sample.- Under 3.15 compilation works fine, under 3.30 all application becomes mad, really mad.-
I've attach an zip file containing both exe (3.15 compiled & 3.30 with patch compiled).- Source code is unique for both.-
With regards. Eduardo.
No hay nada errado con la nueva version comparado con la version 3.1.5. Lo que pasa que en esta ultima hay más nuevas funciones, es decir hay más recursos. La forma que venias utilizando no estaba correcta a mi ver.
Modifiqué tu código y funciona compilando tanto en la actual como en la 3.1.5 tambien.
Code: Select all
#include <hmg.ch>
#define BLUE1 { 218,229,243 }
#define BLUE2 { 000,120,187 }
STATIC cCtrlAnt:="", lProp:=.F.
Function Main
DEFINE WINDOW w_test AT 000 , 000 WIDTH 230 HEIGHT 380 BACKCOLOR BLUE1 TITLE "SIMULATE A MOUSE OVER --- BY AGL" MAIN
ON KEY ESCAPE ACTION Thiswindow.Release()
@ 030,010 LABEL LB_1 VALUE "Opcion 1" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 1" )
@ 055,010 LABEL LB_2 VALUE "Opcion 2" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 2" )
@ 080,010 LABEL LB_3 VALUE "Opcion 3" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 3" )
@ 105,010 LABEL LB_4 VALUE "Opcion 4" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 4" )
@ 130,010 LABEL LB_5 VALUE "Opcion 5" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 5" )
@ 155,010 LABEL LB_6 VALUE "Opcion 6" OF w_test WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR WHITE BACKCOLOR BLUE2 CENTERALIGN ACTION MsgInfo( "Opcion 6" )
@ 250,000 LABEL LB_7 VALUE "" WIDTH 200 HEIGHT 20 FONT 'Verdana' SIZE 9 FONTCOLOR BLACK CENTERALIGN TRANSPARENT
DEFINE STATUSBAR FONT "Courier New" SIZE 9
STATUSITEM PadC("",75)
END STATUSBAR
END WINDOW
CREATE EVENT PROCNAME SELECTCTRL() HWND W_test.HANDLE
CENTER WINDOW w_test
ACTIVATE WINDOW w_test
RETURN Nil
FUNCTION SelectCtrl()
Local cCtrl, cForm, cTemp
Local hWnd := EventHWND()
Local wParam:= EventWPARAM()
If wParam <> w_test.HANDLE
GetControlNameByHandle( wParam, @cCtrl, @cForm )
cTemp:=ALLTRIM( cForm )+If(!Empty(cCtrl),"_"+ALLTRIM( cCtrl ),"")
w_test.LB_7.VALUE := cTemp
_SetItem ( 'StatusBar' , "w_test" , 1 , cTemp )
IF cTemp==cForm
IF lProp
// La intencion es hacer que la Funcion acepte cualquier nombre de Ventana, pero de esta forma no se ejecuta el ACTION del LABEL !
// The intention is to make the function accepts any window name, but this way the ACTION of LABEL is not running!
SetProperty( "w_test", cCtrlAnt, "FONTBOLD" , .F. )
SetProperty( "w_test", cCtrlAnt, "FONTSIZE" , 9 )
SetProperty( "w_test", cCtrlAnt, "BACKCOLOR", BLUE2 )
lProp:=.F.
ENDIF
ELSE
IF ! empty(cCtrl)
IF ! lProp
SetProperty( "w_test", cCtrl, "FONTBOLD" , .T. )
SetProperty( "w_test", cCtrl, "FONTSIZE" , 12 )
SetProperty( "w_test", cCtrl, "BACKCOLOR", BLUE )
cCtrlAnt:=cCtrl
lProp:=.T.
ENDIF
ENDIF
ENDIF
Endif
RETURN Nil
Espero haberte ayudado y que hayas entendido el código modificado.
Un abrazo/Pablo
Hi Eduardo,
There is nothing wrong with the new version compared to version 3.1.5. What happened was that in the 3.3.0 there are more new features, ie more resources.
The way you were coming using was not correct in my opinion.
I modified your code and it works by compiling both the current as in 3.1.5 also.
About your posts with attached files, what happen to you ? Displayed any error message (pls tell us) or you did not know how to do it ? I re-edited your previous message making available the files you have mentioned.
I hope this would helps and you have understood the modified code.
A hug / Pablo
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Events in the new version
Hola Eduardo, en esta cuestion, yo te diria que mantuvieras una función de controlar los eventos para cada form.EduardoLuis wrote:La intencion es hacer que la Funcion acepte cualquier nombre de Ventana
No te funcionaba bien, porque no todos los eventos tienen haber con el form. Es decir, a veces el form viene vacio. Entonces debes solo atribuir nuevo valor al cForm cuando no es vacio.
Saludos/Pablo
Hi Eduardo, in this question, I would tell you to keep it a function to handle events for each form.EduardoLuis wrote:The intention is to make the function accepts any window name
Do not work well because not all events are relationated with the form. I mean, sometimes the form is empty. Then you just need to assign new value to cForm when it is not empty.
Rgds/Pablo
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
- Posts: 683
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Events in the new version
Hola Pablo:
Desde ya gracias por tu respuesta.- Estoy recompilando todos mis desarrollos con la nueva version 3.30 y su patch.- Como el comportamiento de mouse over resultó diferente del que tenía con la 3.15 lo subí.- Ahora voy a implementar tu código.-
Te pido disculpas en no haberte contestado antes.-
Con respecto al upload, el error fue mio por eso quedó resuelto en el ultimo envio.-
Nuevamente gracias por tus consejos. Un abrazo.-
Desde ya gracias por tu respuesta.- Estoy recompilando todos mis desarrollos con la nueva version 3.30 y su patch.- Como el comportamiento de mouse over resultó diferente del que tenía con la 3.15 lo subí.- Ahora voy a implementar tu código.-
Te pido disculpas en no haberte contestado antes.-
Con respecto al upload, el error fue mio por eso quedó resuelto en el ultimo envio.-
Nuevamente gracias por tus consejos. Un abrazo.-