Did you know? (4)
August 13, 2008 |
When you have a function wheter it is a ‘classic’ style public caller or a ‘oo’ style function and you want to check if the user provided certain parameters while calling this function, you can use the isChannelLoaded channel to check if the parameter has been provided by the user.
Example situation: say you have a function to create a new class instance of a car, and the parameters you need to provide are color, wheels, manual/automatic, etc.. The idea is if a user calls the function and for instance doesn’t provide a parameter for the amount of wheels, then inside this function you can assign a default value or trigger some warning message.
Del.icio.us
Digg.com
Technorati.com