Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Nadeem Shah
  Where is Nadeem Shah?
 Rawalpindi
 Pakistan
 Nadeem Shah
 Tags
Subject: RE: Access & assign methods of new property
Thread ID: 155158 Message ID: 155160 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Wednesday, December 26, 2007 3:48:13 PM         
   


> Hi experts
>
> When we create new property then it has to check values
> Access method and assign method.
>
> What is the function of these two methods?
>
> With regards
>
> Nadeem Iqbal

In VFP, you don't really have to use an access or assign method. You can make the visibility of the new property public and simply

MyObject.nMyNewProperty = lnSomeValue


On the other hand, you don't always want to make your property publically visible. You may wish to protect or hide this property. You would then use the access and assign methods to read or populate that property's value. The idea here is that the assignment or reading of the property's value becomes the responsibility of the object itself. In effect, you only "expose" the access and assign methods - the property itself is not exposed.

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Access & assign methods of new property Posted by Nadeem Iqbal @ 12/26/2007 2:49:18 PM
RE: Access & assign methods of new property Posted by Ken Murphy @ 12/26/2007 3:48:13 PM
RE: Access & assign methods of new property Posted by Cetin Basoz @ 12/26/2007 5:27:00 PM
RE: Access & assign methods of new property Posted by Nadeem Iqbal @ 12/28/2007 6:52:45 AM
RE: Access & assign methods of new property Posted by Marcia Akins @ 12/28/2007 5:04:05 PM