Search  
Friday, May 25, 2012 ..:: Forum ::.. Register  Login
 Forum Minimize
Pentru a putea posta mesaje trebuie să vă înregistraţi.
Notă: Mesajele cu conţinut jignitor sau ilegal (inclusiv cereri de soft piratat) nu sunt acceptate şi vor fi şterse imediat .

Pentru a primi raspunsuri rapide si corecte, scrieti in mesaj ce intentionati sa faceti, ce mesaj de eroare primiti, in ce context si in urma caror actiuni. De asemenea, mentionati versiunea de FoxPro in care lucrati!
Dacă nu specificați versiunea, se consideră VFP 9.0 SP2.

SearchForum Home
  Visual FoxPro  Form-uri si generatoare de form-uri  "thisform ...
 "thisform can only be used within a method. "
 
 7/4/2011 9:35:02 AM
User is offlineioandan_chelemen2006
224 posts
4th


"thisform can only be used within a method. "
 (N/A) Modified By ioandan_chelemen2006  on 7/4/2011 9:35:29 AM)
imi apare aceasta eroare intr-o forma cu 2 griduri, un textbox si un checkbox; partea ciudata este ca eroarea imi apare aleatoriu, aparent totul e in regula, functioneaza toate obiectele, eroarea apare la a 4 -a/a -5a editare in textbox, dupa care ies din forma si intru din nou, eroarea aparind parca tot mai des; nu stiu daca am fost f.explicit
 7/4/2011 9:39:23 AM
User is offlineioandan_chelemen2006
224 posts
4th


Re: "thisform can only be used within a method. "
 (N/A) Modified By ioandan_chelemen2006  on 7/4/2011 9:40:32 AM)
problema pare a fi la revenirea pe unul din griduri (fac click pe el pentru a scrie in el), grid editabil care nu are nimic in "Methods"
 7/4/2011 12:48:55 PM
User is offlinerobert_anisoiu
28 posts


Re: "thisform can only be used within a method. "
 (N/A)
Pe ce metode sau evenimente ai scris cod la textbox si la checkbox si ce ai scris?
 7/4/2011 1:49:03 PM
User is offlinevaly.m
227 posts
4th


Re: "thisform can only be used within a method. "
 (N/A)
Probabil ai o procedura prin care ai introdus "thisform.refresh" sau stiu eu, valoarea unui obiect din form.

Valy Maties - Beginner programmer
 7/4/2011 2:33:44 PM
User is offlineGrigore Dolghin
3592 posts
www.class-software.eu
1st






Re: "thisform can only be used within a method. "
 (N/A)
Ai cumva un SET FILTER pe gridul ala si in expresia de filtrare ai "thisform.ceva"? :)

Grigore Dolghin
Visual FoxPro MVP 2006 - 2010
Class Software
My blog
 7/5/2011 12:08:13 PM
User is offlineioandan_chelemen2006
224 posts
4th


Re: "thisform can only be used within a method. "
 (Switzerland)
pe textbox: -GotFocus: thisform.text1.Value = "" thisform.Refresh -InteractiveChange: SET EXACT OFF SET FILTER TO nume = UPPER(ALLTRIM(thisform.text1.Value)) GO TOP thisform.grid2.Refresh pe checkbox: -Click: IF MESSAGEBOX("Adaugati",4+32) = 6 IF w_adaug = .t. SELECT salarii SCATTER MEMVAR FIELDS nume,prenume,cnp,conts, banca SELECT banca SEEK STR(m.cnp,13) IF NOT FOUND() m.nume = ALLTRIM(m.nume)+","+ALLTRIM(m.prenume) m.cont = ALLTRIM(m.conts) IF EMPTY(m.cont) MESSAGEBOX("Nu ati completat contul",0+64) w_adaug = .f. thisform.refresh RETURN ENDIF IF m.banca = .f. MESSAGEBOX("Nu ati bifat",0+64) w_adaug = .f. thisform.refresh RETURN ENDIF APPEND BLANK m.cnp = STR(m.cnp,13) GATHER MEMVAR fields nume,cnp,cont thisform.refresh MESSAGEBOX("Am adaugat!",0+64) ELSE MESSAGEBOX(ALLTRIM(m.nume)+" "+ALLTRIM(m.prenume)+" exista deja in banca",0+64) ENDIF ENDIF ENDIF w_adaug = .f. thisform.Refresh
 7/5/2011 12:11:34 PM
User is offlineioandan_chelemen2006
224 posts
4th


Re: "thisform can only be used within a method. "
 (Switzerland)
am pe textbox -pe GotFocus: thisform.text1.Value = "" thisform.Refresh -pe InteractiveChange: SET EXACT OFF SET FILTER TO nume = UPPER(ALLTRIM(thisform.text1.Value)) GO TOP thisform.grid2.Refresh
 7/5/2011 12:16:57 PM
User is offlineGrigore Dolghin
3592 posts
www.class-software.eu
1st






Re: "thisform can only be used within a method. "
 (N/A)

Am banuit eu ;) Expresiile care contin This si ThisForm dau erori cand sunt folosite in Set Filter.

Foloseste urmatoarea abordare:

lcFilter = "SET FILTER TO nume = " + Upper(Alltrim(ThisForm.text1.Value))
&lcFilter


Grigore Dolghin
Visual FoxPro MVP 2006 - 2010
Class Software
My blog
  Visual FoxPro  Form-uri si generatoare de form-uri  "thisform ...

Search  Forum Home         

 Google Ads Minimize

    

Copyright 2002-2010 Profox   Terms Of Use  Privacy Statement