From: Samir P. <sp...@ci...> - 2004-04-15 12:46:42
|
Thanks for your reply Ian. If I create it as a method than I will lose power of retriving data by just calling field name. Currently I solve it this way: When I need to pass a value to a _get_ method, I am adding a different field to that object and initialzing it with value I want to pass. Then in my _get_ method I am checking whether that object has this new field, If it has this new field, I use that value like a paramenter value otherwise I am using default value. This way I can still retrive my field data by simply calling field name. On Wednesday 14 April 2004 09:14 pm, you wrote: > Samir Patel wrote: > > I need some ideas on solving this problem. > > > > I have int field daysOpen in my SQLObject which is not set by user. I > > wrote a _get_daysOpen which calculates days difference between other > > field (birthday) from todays date. Now I like to calculate days > > difference from user defined date instead of today. How can I do this? > > It will have to be a method, like daysOpenTo(date) |