Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vladimir Zhuravlev
  Where is Vladimir Zhuravlev?
 Medvezhie ozera, Schelkovskiy raion
 Russia
 Vladimir Zhuravlev
 To: ian pano
  Where is ian pano?
 Metro Manila
 Philippines
 ian pano
 Tags
Subject: RE: creating get and set methods for classes
Thread ID: 155190 Message ID: 155191 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Thursday, December 27, 2007 7:55:21 AM         
   


You can make methos for setting different properties with 2 parameters
PROCEDURE setfName()
	LPARAMETERS tcStr, propname
if type('propname') ='C' and type(this+'.propname')!='U' and pemsatus(this,'propname',5) 
cmd = 'this.'+propname +'='+tcSt

&cmd
endif

	ENDPROC

sure you should make checking on the type of tcStr
and conevert it to string, if it is numeric or date or datetime etc





MVP , www.foxclub.ru domain owner
100 friends are better than 100 dollars.

ENTIRE THREAD

creating get and set methods for classes Posted by Christian Pano @ 12/27/2007 7:13:02 AM
RE: creating get and set methods for classes Posted by Vladimir Zhuravlev @ 12/27/2007 7:55:21 AM
RE: creating get and set methods for classes Posted by Boudewijn Lutgerink @ 12/27/2007 9:02:11 AM
RE: creating get and set methods for classes Posted by Cetin Basoz @ 12/27/2007 3:09:00 PM
RE: creating get and set methods for classes Posted by Ken Murphy @ 12/27/2007 4:03:24 PM