Problemas en get con clausula when

Problemas en get con clausula when

Postby astursoft » Fri Dec 16, 2005 10:33 pm

si cogemos el codigo de test05 y le hacemos unos cambios
Code: Select all  Expand view
function Main()

   local oWnd, oFont
   local cName1 := "first     ", nLen1  := 10, cType1 := "C"
   local cName2 := "last      ", nLen2  := 10, cType2 := "C"
   local cName3 := "address   ", nLen3  := 10, cType3 := "C"

   local lvale:= .t.

   DEFINE FONT oFont NAME "Arial" SIZE 0, -10

   DEFINE WINDOW oWnd TITLE "Tutor05"

   @ 1, 2 SAY "Create DBF Test" SIZE 100, 20 COLOR "R+/B" FONT oFont

   @ 3, 2 SAY " FieldName   Type   Len" SIZE 150, 20 COLOR "GR+/G"

   @ 6,  2 GET cName1 SIZE 60, 20 when .f.
   @ 6, 11 GET cType1 SIZE 20, 20
   @ 6, 15 GET nLen1  SIZE 30, 20 PICTURE "999"

   @ 8,  2 GET cName2 SIZE 60, 20 when lvale
   @ 8, 11 GET cType2 SIZE 20, 20
   @ 8, 15 GET nLen2  SIZE 30, 20 PICTURE "999"

   @ 10,  2 GET cName3 SIZE 60, 20 when !lvale
   @ 10, 11 GET cType3 SIZE 20, 20
   @ 10, 15 GET nLen3  SIZE 30, 20 PICTURE "999"
   
   @ 10, 2 BUTTON "&Create" SIZE 60, 30 ACTION ( DbCreate( "test.dbf",;
                                                         { { cName1, cType1, nLen1, 0 },;
                                                           { cName2, cType2, nLen2, 0 },;
                                                           { cName3, cType3, nLen3, 0 } }

),;
                                                 MsgInfo( "test.dbf created!" ) )
                                                           
   @ 12, 2 BUTTON "&End"    SIZE 60, 30 ACTION oWnd:End()

   ACTIVATE WINDOW oWnd
   
return nil

ponemos los when :
1.-si vamos al primer get que esta when .f. , nos deja escribir (no debería)
2.- Si vamos directamente al 4 get que tiene when lvale que es verdadero y escribimos y luego intentamos pasar al 8 get ( que no debe dejar entrar ) , entonces nos devuelve el foco al 4 get ( correcto) , pero no deja cambiar de foco a otros gets o a los botones ( que si deberian ser accesibles)
No sé si se entiende .
Jose Luis Parajón
Asturias
User avatar
astursoft
 
Posts: 139
Joined: Sun Nov 06, 2005 6:14 pm
Location: Asturias

Postby Antonio Linares » Sat Dec 17, 2005 5:45 am

Jose Luis,

Arreglado. Hay un nuevo build FWPPC que ya se puede descargar.

Gracias,
regards, saludos

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


Return to FiveWin para Pocket PC

Who is online

Users browsing this forum: No registered users and 3 guests