Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form class not staying active
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01080334
Message ID:
01080382
Vues:
15
Sergey
You got me pointed in the right direction. The solution was to make the object public to keep it in scope.

Thanks, Chuck...........have a Merry Christmas

>Chuck,
>
>The oAttend variable goes out of scope as soon as method ends.
>
>>Thanks for responding, Look at this code, the form still disappears when it hits "endwith".
>>
>>* Routine: cmdselect.click
>>local lcClass,lcMo,lcDate,lcDay,lcYr
>>store "" to lcClass,lcMo,lcDate,lcDay,lcYr
>>
>>with ThisForm
>>   if .grdSignUp.LastRow # 0
>>	if !empty(curEmployees.ccity) and !empty(curEmployees.cbldg)
>>		lcDate = allt(curEmployees.classdate)
>>		lcClass = allt(curEmployees.classes)
>>		lcMo = substr(lcDate,1,at(" ",lcDate)-1)
>>		lcDay = substr(lcDate,at(",",lcDate)-2,2)
>>		lcYr = right(lcDate,4)
>>		* call attended object so filter can be set and reset
>>	   select attended,classes,ccity,cbldg,croom,cmonths,cdates,cyears ;
>>		from signup ;
>>		into cursor curAttended ;
>>		where classes=lcClass and cmonths=lcMo and cdates=lcDay and cyears=lcYr
>>	   oAttend = createobj('attended',lcClass,lcMo,lcDay,lcYr,alias())
>>	   deactivate window menuscr
>>	   oAttend.visible=.T.
>> 	   oAttend.show
>>	else
>> 	   Messagebox("Please select a valid class to update the Class
>Attendance",48,"Class has no City or Building association")
>>	endif
>>   else
>>	Messagebox("Please highlight a record to update the Class
>Attendance",48,"No Class Selected")
>>   endif
>>endwith
>>
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform