On Change en control Textbox

Moderator: Rathinagiri

Post Reply
Mario Mansilla
Posts: 244
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina
Been thanked: 2 times

On Change en control Textbox

Post by Mario Mansilla » Fri Oct 22, 2010 4:44 pm

Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
Attachments
Test.rar
(8.6 KiB) Downloaded 41 times

User avatar
Roberto Lopez
HMG Founder
Posts: 3919
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 15 times
Been thanked: 140 times

Post by Roberto Lopez » Fri Oct 22, 2010 4:48 pm

Mario Mansilla wrote:Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
This is a known bug.

I've solved but it had a nasty side effect, so I've retired the fix until another new solution arises.

Maybe Grigory had solved.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
gfilatov
Posts: 575
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 14 times
Been thanked: 141 times
Contact:

Post by gfilatov » Fri Oct 22, 2010 6:45 pm

Roberto Lopez wrote:
Mario Mansilla wrote:Hola :
Ver ejemplo
La consulta es la siguiente :
¿ Porque se ejecuta 2 veces el evento On Change del control Textbox antes del evento On Init del Form_1 cuando utilizo la propiedad Inputmask ? :(

Hello
View sample
The query is:
Why run 2 times the On Change event of Textbox control before the Init event of Form_1 On when using InputMask property?

Uso HMG3.0.35 xp sp2
Saludos
Mario Mansilla
This is a known bug.

I've solved but it had a nasty side effect, so I've retired the fix until another new solution arises.

Maybe Grigory had solved.
Hi Mario,

Roberto are right: your sample works properly in Minigui Extended (just tested 8-) ).
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

Mario Mansilla
Posts: 244
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina
Been thanked: 2 times

Post by Mario Mansilla » Mon Oct 25, 2010 7:51 pm

Ok Gracias , Roberto y Grigory

Mario Mansilla

User avatar
danielmaximiliano
Posts: 2087
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 114 times
Been thanked: 15 times
Contact:

Post by danielmaximiliano » Tue Oct 18, 2011 1:09 pm

Hola a todos:
anoche me quede estancado en algo muy simple , no puedo ver donde esta mi equivocacion
un simple diseño de formulario conteniendo un TextBox y un Label.
intento usar ON ENTER asi validar el TextBox en un procedimiento y carga el contenido en un Label, pero no pude
dejo el codigo para que lo vean y la imagen con el error que me tira al ejecutar dicho codigo.

Code: Select all

	#include 'hmg.ch'

Function Main
        
    DEFINE WINDOW main;
      AT 138 , 235 ;
	  WIDTH 550 HEIGHT 350;
      TITLE "Test TextBox Numeric " ;
      MAIN 
      
   DEFINE TEXTBOX Text_1
        ROW    60
        COL    270
        WIDTH  120
        HEIGHT 24
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        ONCHANGE Nil
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONENTER Valida()
        HELPID Nil
        TABSTOP .T.
        VISIBLE .T.
        READONLY .F.
        RIGHTALIGN .F.
        DISABLEDBACKCOLOR Nil
        DISABLEDFONTCOLOR Nil
        CASECONVERT NONE
        BACKCOLOR Nil
        FONTCOLOR Nil
        INPUTMASK Nil
        FORMAT Nil
        NUMERIC .T. 
        VALUE 0
    END TEXTBOX
     
 
    @ 130, 120 LABEL Label_1;
        VALUE "Value TextBox :="
        

    END WINDOW

    Main.Activate

Return

 Procedure Valida()
  main.Label_1.value:= main.Label_1.value + str(Text_1 , 4)
  main.Text_1.setfocus
 return
EMain.png
EMain.png (46.9 KiB) Viewed 699 times
será mucho el sueño y no veo el error, gracias por su ayuda.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Tue Oct 18, 2011 2:51 pm

Objects are LOCAL in HMG4, so

ONENTER Valida( main )

and

Procedure Valida( main )

should help.

User avatar
danielmaximiliano
Posts: 2087
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 114 times
Been thanked: 15 times
Contact:

Post by danielmaximiliano » Tue Oct 18, 2011 4:13 pm

HI Ricci:
sorry, I forgot to mention that is HMG.3.0.39
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

User avatar
danielmaximiliano
Posts: 2087
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Has thanked: 114 times
Been thanked: 15 times
Contact:

Post by danielmaximiliano » Tue Oct 18, 2011 5:39 pm

HI :

Sr. Ratinagiri, ud puede borrar mis post y el de Ricci.
ya solucione el problema.
es una tonteria mi pregunta al foro.
queria trabajar sobre una variable y con el sueño que tenia no vi que estaba mal.
era sencillamente

Code: Select all

STR(main.text_1.value,4)
pido disculpas por el tiempo de leer mi post


Mr. Ratinagiri, you can delete my post and that of Ricci.
and fix the problem.
my question is silly to the forum.
wanted to work on a variable and had the dream that I saw was wrong.
was simply

Code: Select all

STR(main.text_1.value,4)
I apologize for the time to read my post
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`.HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. : +54901169026142
Telegram Name : DaNiElMaXiMiLiAnO

Post Reply