Page 1 of 1

Event ON CHANGE Control TAB

Posted: Sun Mar 22, 2009 1:33 pm
by jouhmg
English(poor)

Using HMG 2.6.0.
With the following code I have not had any problems
up to version 2.6.0:

DEFINE TAB Tab01 OF Win01 AT nRow, nCol;
WIDTH 652 HEIGHT 310;
FONT "Tahoma" SIZE 9 BOLD;
NOTABSTOP;
VALUE nPage;
ON CHANGE (|| InicializarPage ())

But, starting with Version 2.6.1, application crashes.

With the following code will work, but I did not serve
I can not use the Event ON CHANGE:

DEFINE TAB Tab01 OF Win01 AT nRow, nCol;
WIDTH 652 HEIGHT 310;
FONT "Tahoma" SIZE 9 BOLD;
NOTABSTOP;
VALUE nPage

Just in Version 2.6.1 was performed on a Fixed
the Event (ON CHANGE)

Español

Uso HMG 2.6.0.
Con el siguiente código no he tenido problemas
hasta la versión 2.6.0:

DEFINE TAB Tab01 OF Win01 AT nRow, nCol;
WIDTH 652 HEIGHT 310;
FONT "Tahoma" SIZE 9 BOLD;
NOTABSTOP;
VALUE nPage;
ON CHANGE {|| InicializarPage() }

Pero, a partir de la Versión 2.6.1, la aplicación se cuelga.

Con el siguiente código se soluciona, pero no me sirve
ya que no puedo usar el Evento ON CHANGE:

DEFINE TAB Tab01 OF Win01 AT nRow, nCol;
WIDTH 652 HEIGHT 310;
FONT "Tahoma" SIZE 9 BOLD;
NOTABSTOP;
VALUE nPage

Justamente en la Versión 2.6.1 se realizó un Fixed en
dicho Evento (ON CHANGE del TAB)

Gracias y Saludos
jouhmg

Re: Event ON CHANGE Control TAB

Posted: Sun Mar 22, 2009 4:54 pm
by esgici
jouhmg wrote: ...
Using HMG 2.6.0. With the following code I have not had any problems
up to version 2.6.0:
...
But, starting with Version 2.6.1, application crashes.
...
Hola jouhmg

Sorry, I can't simulate your "crashe" situation.

Could you change / modify following working sample to demonstrate the problem ?

Code: Select all

#include "minigui.ch"

PROC Main()

   DEFINE WINDOW Test AT 0,0 WIDTH 680 HEIGHT 360 MAIN

      DEFINE TAB Tab01 ; 
         AT 10, 10 ; 
         WIDTH 652 HEIGHT 310 ; 
         FONT "Tahoma" SIZE 9 BOLD ;
         VALUE 1 ;
         NOTABSTOP; 
         ON CHANGE MsgExclamation( "Changed" )
         
        PAGE 'Page &1' 

           @ 100,250 BUTTON Button_1 CAPTION "Test" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')

        END PAGE

        PAGE 'Page &2' 

           DEFINE RADIOGROUP R1
              ROW   100
              COL   100
              OPTIONS   { '1','2','3' }
              VALUE 1
           END RADIOGROUP

        END PAGE
         
      END TAB // Tab01
      
   END WINDOW // MAIN

   Test.CENTER
   Test.ACTIVATE
   
RETU // Main()
Saludos

--

Esgici

Re: Event ON CHANGE Control TAB

Posted: Tue Mar 24, 2009 2:43 am
by luisvasquezcl
Hola,
por que no te ahorras el problema y en vez de pasarle un bloque de codigo le pasas solo la funcion?
no entiendo cual es el motivo de pasarle un bloque de codigo.
Simplemente, ON CHANGE InicializarPage()
Saludos,

Re: Event ON CHANGE Control TAB

Posted: Wed Apr 15, 2009 1:49 pm
by jouhmg
English(poor)

Hi:

Today I was able to fix it.
Removing Win.Tab.Value: = nTabPage inside the InicializarPage() Function.

Thanks for your help.(Esgici and Luis)

Español

Hola:

Hoy he podido solucionarlo.
Quitando Win.Tab.Value := nTabPage dentro de la Function InicializarPage().

Gracias por vuestra ayuda a Esgici y Luis.