|
Posted by Dikkie Dik on 05/19/06 18:00
> I've got a class that builds a calendar for the current month. I have
> an extending class that adds links to all days in the calendar via
> browser querystring.
>
> My goal is to create links not to every single day, but only to days
> that satisfy a certain condition - very similar to blog calendars with
> posting dates highlighted. No post on that day - the date is not
> highlighted.
>
> I have to run a query from the extending class, which is totally new to
> me. Any pointers?
>
You don't have to run a query from the extending class at all. In fact,
I can't see it as the responsibility of a calender class to dig in a
database.
I think your extending class needs to be passed a links collection (or
array) in either the constructor or a setter.
It is the responsibility of the code that _calls_ the calendar to
provide the links list. This list may then come from memory, a database,
or wherever.
Best regards
Navigation:
[Reply to this message]
|