Page 1 of 1

Posible Bug fw2104 al refrescar dialogos

PostPosted: Wed Jun 09, 2021 2:55 pm
by leandro
Buenos días para todos,

En estos días he estado intentando actualizar la aplicación utilizando la ultima versión de fw 2104, pero resulta que tengo unos problemas al momento de refrescar la información en algunos diálogos, el contenido de las variables parece estar ahí, pero no se ven al momento de hacer el update() ó refresh() voy a tratar de hacerme entender con esta imagen:

Cabe aclarar que con la versión fwh1909 funcionaba correctamente.

Image

El código:

Code: Select all  Expand view

cbArtic :=  <|desde,dato|
                oArt:= cBusc():New(::oCnx,"articulos")
                oArt:vListaPrecios := vLisPre /*PASAMOS LA LISTA DE PRECIOS A LA BUSQUEDA DE ARTICULOS*/
                oArt:vDesde := desde
                oArt:vDato := dato
                oArt:gestiona(oDlgItm,oGart)
                vlGart := oArt:hRetorna["salida"]
                oSelf:hDatos["articulo"] := Completa(oArt:hRetorna["articulo"],15)
                oSelf:hDatos["nombre"] := oArt:hRetorna["nombre"]
                oSelf:hDatos["tipoIva"] := oArt:hRetorna["tipoIva"]
                oSelf:hDatos["porIva"] := oArt:hRetorna["porIva"]
                nVlUnt := Retorna_Numero(oArt:hRetorna["precio"])
                oSelf:hDatos["unitario"] := nVlUnt
                ::calcular()
                oDlgItm:update()
            >
...
DEFINE DIALOG oDlgItm RESOURCE "ORFACT1" OF oDlg ICON "#8001" FONT oFontItem
...
    REDEFINE GET oGart VAR oSelf:hDatos["articulo"] ID 139 OF oDlgItm UPDATE BITMAP "Bbusc" PICTURE "@N";
            ACTION EVAL(cbArtic,.T.) VALID (EVAL(cbArtic,.F.,oSelf:hDatos["articulo"]),vlGart)
...
ACTIVATE DIALOG oDlgItm
...
 

Re: Posible Bug fw2104 al refrescar dialogos

PostPosted: Wed Jun 09, 2021 3:21 pm
by Antonio Linares
Leandro,

Puedes poner una imagen de antes y después ?

Se dibujan bien pero el contenido no es correcto ?

Estás usando DBFs, SQL, ... ?

Re: Posible Bug fw2104 al refrescar dialogos

PostPosted: Wed Jun 09, 2021 5:26 pm
by leandro
Antonio gracias por responder,
Lo hago con conexión a mysql, mediante ADO
Code: Select all  Expand view

//CREAMOS UNA CONEXION
cCnd := cadenaconexion()
oCnFtr := FW_OpenAdoConnection( cCnd )
 


1. Antes de abrir dialogo de selección
Image

2. Abrimos el dialogo de selección
Image

3. Debería refrescarse la información en los GET's
Image

Re: Posible Bug fw2104 al refrescar dialogos

PostPosted: Wed Jun 16, 2021 9:04 pm
by leandro
Buenas tardes para todos

Bueno parece que encontré en donde esta el problema, tiene que ver con la clausula PICTURE

Code: Select all  Expand view

//Así tengo el get definido y así NO funciona
REDEFINE GET oGcel VAR oFac:hSucursal["movil"] ID 68 OF oDlgFct UPDATE

//Le agregue la clausula PICTURE y ahora si actualiza la información
REDEFINE GET oGcel VAR oFac:hSucursal["movil"] ID 68 OF oDlgFct UPDATE PICTURE "@N"
 


El problema es que casi todos los GET los tengo definidos de esa manera, y no quiero tener que cambiarlos en toda la aplicación.

Hay alguna solución para eso, que no sea cambiarlos todos?

De antemano gracias

Re: Posible Bug fw2104 al refrescar dialogos

PostPosted: Thu Jun 17, 2021 11:12 am
by Antonio Linares
Leandro,

Lo estamos revisando.

Muchas gracias, excelente observación

Re: Posible Bug fw2104 al refrescar dialogos

PostPosted: Thu Jun 17, 2021 3:06 pm
by nageswaragunupudi
I did not see the picture format "@N" in any documentation. I do not think that is a valid picture format and is ignored.

We checked and found no problem with controls with UPDATE clause getting updated/refreshed with the latest version also.

This is our test program:
Code: Select all  Expand view
#include "fivewin.ch"

function Main()

   local oDlg, oFont, aGet[ 2 ]
   local n1    := 2000
   local n2    := 3000

   SetGetColorFocus()

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-16
   DEFINE DIALOG oDlg SIZE 400,200 PIXEL TRUEPIXEL FONT oFont TITLE FWVERSION

   @  30, 30 SAY n1 PICTURE "9,999" SIZE 100,24 PIXEL OF oDlg UPDATE
   @  60, 30 SAY n2 PICTURE "@N"    SIZE 100,24 PIXEL OF oDlg UPDATE

   @  30,150 GET n1 PICTURE "9,999" SIZE 100,24 PIXEL OF oDlg UPDATE RIGHT
   @  60,150 GET n2 PICTURE "@N"    SIZE 100,24 PIXEL OF oDlg UPDATE

   @ 110,30 BUTTON "INCRVALUES" SIZE 150,30 PIXEL OF oDlg ACTION ( ;
      n1 += 100, n2 += 150, oDlg:Update() )

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 


We can see SAYs and GETs getting updated with new values.
Image

You may change this program or post a small self-contained program that shows ur problem so that we can build and test at our end and provide a solution.