Fwh 8.08 - Corrections in classes

Fwh 8.08 - Corrections in classes

Postby ORibeiro » Tue Oct 21, 2008 12:30 pm

Corrections in class:

Fwh 8.08:

Class: SAY.PRG = Removes line 266 because it makes the text to disrespect the limit of the field defined in the resource
// ::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )

Class: WINDOW.PRG = Removes the line 2434 of the KeyChar method () because it makes with that keyboard key ESC in the systems using windows MDI take off the focus of the MsgYesNo ()
// ::oWnd:KeyChar( nKey, nFlags )

Thank´s

Oscar Ribeiro
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Postby Antonio Linares » Mon Oct 27, 2008 11:42 am

Oscar,

>
Class: SAY.PRG = Removes line 266 because it makes the text to disrespect the limit of the field defined in the resource
// ::nWidth := GetTextWidth( 0, ::cCaption, If( ::oFont != nil, ::oFont:hFont,) )
>

This has been improved in FWH 8.09 and 8.10

>
Class: WINDOW.PRG = Removes the line 2434 of the KeyChar method () because it makes with that keyboard key ESC in the systems using windows MDI take off the focus of the MsgYesNo ()
// ::oWnd:KeyChar( nKey, nFlags )
>

Could you provide a small example to test it ? Do you mean to press ESC on a MsgYesNo() shown on top of a MDI frame or a MDI child ? thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby ORibeiro » Fri Oct 31, 2008 1:37 pm

Hi Antonio,

It is a pleasure to contact you.

The problem happens with MDI Child. In my application, when I pressure ESC to close the Child Window the MsgYesNo(“Desires to leave?”) he is disoriented and not insurance the focus in it.

I tried to reproduce in a small example but I did not obtain.

All new version is necessary to disactivate this line that I mentioned in the Window.prg to correct this problem.


I wait to have helped.

Thanks a lot.

Oscar Ribeiro
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Postby Antonio Linares » Fri Oct 31, 2008 5:51 pm

Oscar,

Do you call MsgYesNo() from the VALID of the MDI child window ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby ORibeiro » Mon Nov 03, 2008 1:07 pm

Antonio,

This is my VALID.

Code: Select all  Expand view

   ACTIVATE DIALOG oDlgP NOWAIT VALID oWndC:End()
   ACTIVATE WINDOW oWndC ;
            ON PAINT FnSelect(cDbf[01]);
            VALID (SysWait(0.1),tBtPrinc[09]:SetFocus(),iif(Atualizou(oDlgP),(Grava(.T.)),.T.),oScb:SetFocus(),Destroi_Campos(),;
                   Fecha_Arquivo(cDbf[1]),Fecha_Formulario(oWndC,oDlgP,,cFrm,cPrg) )


********************************************************************************************
FUNCTION Atualizou(oDlg,lGravou)
********************************************************************************************
* Verifica se houve alteracoes na get sem serem salvas *
Local f:=1
local g:=1
local h:=1
local Contador:=0
local a,b
   lGravou := iif(lGravou=nil,.F.,lGravou) // Verifica se houve a gravacao
   While f<=Len(oDlg:aControls) //acontrols é uma propriedade de todas as dialogs e é criada automaticamente
      if     oDlg:aControls[f]:ClassName()="TGET" .or. oDlg:aControls[f]:ClassName()="TMULTIGET"
         a := oDlg:aControls[f]:cCaption  // Gets Antes
         b := oDlg:aControls[f]:cText     // Gets Depois
         if a<>b
            oDlg:aControls[f]:cCaption:=b // Atualiza cCaption
            if !lGravou // Se nao gravou
               Contador++
            endif
         endif
      elseif oDlg:aControls[f]:ClassName()="TFOLDER"
         g := 1
         While g<=Len(oDlg:aControls[f]:aDialogs) // Checa todos os Dialogs da Folder
            h := 1
            While h<=Len(oDlg:aControls[f]:aDialogs[g]:aControls)
               if oDlg:aControls[f]:aDialogs[g]:aControls[h]:ClassName()="TGET" .or. oDlg:aControls[f]:aDialogs[g]:aControls[h]:ClassName()="TMULTIGET"
                  a := oDlg:aControls[f]:aDialogs[g]:aControls[h]:cCaption  // Gets Antes
                  b := oDlg:aControls[f]:aDialogs[g]:aControls[h]:cText     // Gets Depois
                  if a<>b
                     oDlg:aControls[f]:aDialogs[g]:aControls[h]:cCaption:=b // Atualiza cCaption
                     if !lGravou // Se nao gravou
                        Contador++
                     endif
                  endif
               endif
               h++
            enddo
            g++
         end
      endif
      f++
   End
   if !lGravou .and. !Empty(Contador)
      Return(.T.)
   Endif
Return(.F.)

********************************************************************************************
Static function Grava(lConf)
********************************************************************************************
   If lConf
      if !MsgYesNo("Confirma a gravação?","Confirme")
         Return(.F.)
      endif
   Endif
   // VÁLIDO //
   if !Valido()
      Return(.F.)
   endif
   Select (cDBF[01])
   // Se alterou o Nome, modifica arquivos relacionados //
   if cNovo<>"NOVO" .and. Field->Nome<>CFNome[2]
      FnAltNome( "FOR", cPrg, CFNome[2], Field->Nome )
   endif
   Select(cDbf[01])
   FnReplace(,,,cPrg,cDbf[1],cNovo,.T.)
   cNovo := "CONSULTA"
   Atualiza_Campos()
   CFAbrev[1]:Setfocus()
   CFNr_Fo[1]:SetFocus()
Return(.T.)



Thank you.
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Postby ORibeiro » Wed Nov 05, 2008 5:09 pm

Dear Antonio,
Does you read my example?
Thanks
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Postby miragerr » Sun Nov 09, 2008 7:18 pm

Comigo isso tambem acontece

Uma coisa que percebi é que se EU comento esta linha na Window.prg funciona normal

ORIGINAL
Code: Select all  Expand view

   METHOD EndPaint() INLINE ::nPaintCount--,;
                     EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil , 0 // keep this zero here!



MODIFICADO
Code: Select all  Expand view

   METHOD EndPaint() INLINE ::nPaintCount--,;
                     EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil // , 0  // keep this zero here! ///// ---->>> comento o ZERO



Desta forma funciona normal, quando tenho VALID nas dialogs

Fico no aguardo
Jackson Douglas C. Brito
Boa Vista - RR - Brasil
FWH 12.09 Last Build
xHarbour Free
UESTUDIO
SQLRDD
User avatar
miragerr
 
Posts: 140
Joined: Tue Oct 11, 2005 2:36 am
Location: Brasil

It´s possible to solve

Postby ORibeiro » Fri Nov 28, 2008 7:08 pm

Antonio,
It´s possible to solve in next version?
Thanks
Oscar
Oscar Ribeiro
OASyS Informática
Fwh18.02 + xHarbour 1.2.3 + Bcc72
User avatar
ORibeiro
 
Posts: 187
Joined: Mon Oct 20, 2008 6:33 pm
Location: Itu, Sao Paulo, Brazil

Postby Antonio Linares » Fri Nov 28, 2008 8:24 pm

Oscar,

We need a small and self contained example to test here.

Please provide us an example that reproduces what you describe, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Fri Nov 28, 2008 8:26 pm

Jackson,

You should not remove that zero. Its important to keep it here.

Please provide a small and self contained example to reproduce the problem with a dialog, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 86 guests