Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking if column has a control
Message
De
07/03/2011 02:18:40
 
 
À
06/03/2011 14:07:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01502528
Message ID:
01502806
Vues:
147
This message has been marked as a message which has helped to the initial question of the thread.
>OK, what's a zombie object?
>

A zombie object is an object that seems alive,
but it is really dead.

Until now I could not find a way to distinguish a zombie
from an true object without generating an error!!!!
Does anyone have an idea?
CLEAR

x=CREATEOBJECT("testClass")
? PEMSTATUS(x,"SomeMember",5)	&& .T.
? PEMSTATUS(x,"SomeMember",3)	&& Object
? VARTYPE(x.SomeMember) 		&& Object
? VARTYPE(x.SomeMember,.T.) 	&& Object
? TYPE("x.SomeMember") 			&& Object
? x.SomeMember					&& Object
? AMEMBERS(ax,x.SomeMember)	&& 88 !!!
ON ERROR ? MESSAGE()
? x.SomeMember.Name				&& ERROR

DEFINE CLASS testClass AS Custom


	ADD OBJECT SomeMember AS TextBox
	
	PROCEDURE SomeMember.Init
		RETURN .F.
ENDDEFINE
>
>
>>>Hi everybody,
>>>
>>>I'm looping through the all columns in the grid using for each loColumn in this.Columns and I'd like to set DynamicCurrentControl property for most of the columns. I'd like to check first, if my column has a check1 and check2 controls. I'm not exactly sure how? Using type or getpem?
>>>
>>>Any ideas?
>>>
>>>Thanks in advance.
>>
>>PEMSTATUS,VARTYPE,TYPE can do the job.
>>
>>BUT!
>>If check1 is a class's member
>>and check1.init returns .F. or Column.RemoveObject('check1') is called,
>>they return a zombie object.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform