FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour tFolderEX posible solucion ON CHANGE
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
tFolderEX posible solucion ON CHANGE
Posted: Thu Oct 13, 2011 02:18 PM
Estimados

El los folder el mensaje ON CHANGE si retornaba .f. este no cambiaba de pesta帽a, pero con
FOLDEREX cambia igualmente

una posible solucion es evaluar antes ..

Code (fw): Select all Collapse
METHOD SetOption( nOption ) CLASS TFolderEx

聽 聽LOCAL nOldOption := ::nOption, lVal
聽 聽LOCAL nOpt :=0, nOldOpt := 0, i := 0, lVisible

聽 聽IF ! ::aEnable[ noption ]
聽 聽 聽 RETURN NIL
聽 聽ENDIF

聽 聽if nOption != ::nOption

聽 聽 聽 if ! Empty( ::bAction )
聽 聽 聽 聽 聽lVal := Eval( ::bAction, nOption, nOldOption, Self )
聽 聽 聽 聽 聽 聽 if valtype( lVal ) = "L" .and. !lVal
聽 聽 聽 聽 聽 聽 聽 聽 Return( NIL )
聽 聽 聽 聽 聽 聽 endif
聽 聽 聽 endif

聽 聽 聽 IF ::aSrcPrompt != NIL


..
..
y comentar esto

聽聽 聽 聽/*if ! Empty( ::bAction )
聽 聽 聽 聽 聽Eval( ::bAction, nOption, nOldOption, Self )
聽 聽 聽 endif*/

聽 聽 聽 ::ChangeOrder()
聽 聽 聽 ::Refresh()

聽 聽endif

return nil
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 166
Joined: Mon Dec 12, 2005 09:56 AM
Re: tFolderEX posible solucion ON CHANGE
Posted: Thu Jun 24, 2021 11:51 AM

Gracias, me estaba volviendo loco. 10 a帽os despu茅s (FW 2102) aun no ha sido solucionado y con el prg de TFolderex de las ultimas versiones sigue con el problema que describes.

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: tFolderEX posible solucion ON CHANGE
Posted: Thu Jun 24, 2021 12:20 PM
Espero haber entendido vuestras sugerencias, a ver si esto os valdr铆a igualmente
Code (fw): Select all Collapse
METHOD SetOption( nOption ) CLASS TFolderEx

   LOCAL nOldOption := ::nOption
   LOCAL nOpt :=0, nOldOpt := 0, i := 0, lVisible

   nOption = Max( 1, Min( nOption, Len( ::aPrompts ) ) )

   IF ! ::aEnable[ nOption ]
      RETURN NIL
   ENDIF

   // A帽adido CNL 24/06/2021
   if Valtype( ::bChange ) = "B"
      if !Eval( ::bChange, Self, nOption, ::nOption )
         Return nil
      endif
   endif

   if nOption != ::nOption
.../...


Sin perder la funcionlidad del :bAction
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 166
Joined: Mon Dec 12, 2005 09:56 AM
Re: tFolderEX posible solucion ON CHANGE
Posted: Thu Jun 24, 2021 05:03 PM

Gracias Cristobal,
Tal y como lo has puesto no funciona, a pesar de que en la declaraci贸n del FORDEREX tengo puesto "ON CHANGE mifuncion()", al llegar al c贸digo que has puesto, el ::bChange no es un codebloq y no se evalua, ah铆 valtype(::bChange) devuelve 'U' en vez de 'B'.

Saludos

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: tFolderEX posible solucion ON CHANGE
Posted: Thu Jun 24, 2021 07:26 PM
Sebastian, si funciona, lo que no se ha cambiado es el metacomando
Si pruebas asi
Code (fw): Select all Collapse
   @ r. c FOLDEREX oFld ...
   oFld:bChange   := { || .F. }

lo podr谩s probar
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noci贸n del tiempo

El secreto de la felicidad no est谩 en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 166
Joined: Mon Dec 12, 2005 09:56 AM
Re: tFolderEX posible solucion ON CHANGE
Posted: Fri Jun 25, 2021 04:52 PM

As铆 si funciona, gracias Cristobal.

Continue the discussion