How to cater for missing input to a class
View Single Post
08-27-2009, 06:58 AM
Join Date: Jul 2009
Yes definitely do it in the class, keep it all contained and encapsulated.
The code I gave you is not hard coding a value as such, as it refers to a default option, making the 2nd variable optional from outside the class! So you do not need to pass the 2nd variable when initiating the class object, however you will need to check in the class if another value besides the default has been passed.
Maybe we are not on the same page?!?!
OpenSource is the road ahead...!
The Following User Says Thank You to JaoudeStudios For This Useful Post:
View Public Profile
Send a private message to JaoudeStudios
Visit JaoudeStudios's homepage!
Find More Posts by JaoudeStudios