Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OOP aware DoForm function suggestions
Message
From
04/01/2009 12:25:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9 SP1
Application:
Desktop
Miscellaneous
Thread ID:
01370806
Message ID:
01370895
Views:
13
>Hi Cetin
>
>>What do you mean "OOP wants me to populate the properties instead of passing parameters and I agree with it"? I wouldn't agree, I think but probably I didn't understand.
>
>Yes, you have guessed right. As for OOP I am under the impression that the LPARAMETERS in the init() of a class is something that should be avoided and instead properties are used which are populated in code to replace LPARAMETERS
>
>>oForm = doform()
>>oForm.SomeProperty = somevalue
>
>DoForm() does not do much
>
...
>			loObject = CREATEOBJECT(tcClassName, @tuParm1, @tuParm2, @tuParm3, @tuParm4)
>	ENDCASE
>
>	IF TYPE("loObject.Name") == "C"
>*  ===>  this is where the properties should be populated if I avoid the above call parameters
>		loObject.SHOW()
>
>		IF TYPE("loObject.uRetVal") # "U"
>			RETURN loObject.uRetVal
>		ENDIF
>
>	ENDIF
>...
>
>Probably this was a wrong question and I just got carried away with it. As I will have to manually call .SHOW() in case even if I do something as what you have hinted.
>
>Thanks.

"As for OOP I am under the impression that the LPARAMETERS in the init() of a class is something that should be avoided"
Your impression was wrong IMHO. If you wouldn't feel well anyway then you can do that exactly as I show before the .Show() call. ie:
	IF TYPE("loObject.Name") == "C"
*  ===>  this is where the properties should be populated if I avoid the above call parameters
                    loObject.SomeProperty = someValue
		loObject.SHOW()
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform