Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this intended Behaviour ?
Message
De
03/12/2003 04:37:37
Matthias Will
BiCON Systemtechnik GmbH
Karlsruhe, Allemagne
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Is this intended Behaviour ?
Divers
Thread ID:
00855319
Message ID:
00855319
Vues:
55
Hi all,

in a PRG-Class you have the ability to add objects to a defined class by ADD OBJECT [PROTECTED] ObjName AS ObjClass etc. Exactly this I wanted to do, but my new object should be protected - so I used the PROTECTED keyword. All ok so far - BUT - if I return the added object to the caller of a method, all its properties and methods are protected too and this object is of no use ?! IMHO this smells like buggy behaviour, doesn't it ?

Just try :
SET PROCEDURE TO Test
o = CREATEOBJ('Test')
lo = o.GetProtectedObject()
? lo.Class
The class (Test.prg) :
DEFINE CLASS Test AS Custom
	ADD OBJECT PROTECTED Test2 AS Custom

	PROCEDURE GetProtectedObject AS Custom
		RETURN m.this.Test2
	ENDPROC
ENDDEFINE
Best Regards
Matthias
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform