Is there anyway of using a class as a glorified function? I was asked about using a Timer Class yesterday, but it seems the thread has got lost during maintenance???
My aim is to send the the event.target.name and another string to a function - have it perform a series of case statements and return a string based on the calculations. It is however a very long series of case statements and would clutter up my document class quite considerably, especially if I need more than one of these “functions”.
So what I don’t currently understand and am trying vehemently to understand is how I might use a class to do this for me? I can’t see how this “function” can be an object? Can I perform a get statement on the result of this function or something, but I would still need to parse the information to it?
I hope you can understand my ignorance and perhaps enlighten me a little??? I have looked on the forums but cant find anything I quite fully understand, I daren’t say it is a flaw with OOP - I thinks its a flaw with my logic… many thanks!