Hello, Mr Muskrat, sorry about the delay in getting back to you - I've been waiting for some time to go through this properly.

Firstly this is a definite solution to the problem - it is throwing the calendars, with their specific day arrays into a container table.
Secondly, I don't understand it!!

Well, there are one or two things that are new to me and perhaps if you have a little time you wouldn't mind explaining them to me?

In the sub CreateCal: push ( @days, [ @day ] ); # store the days of each calendar
you're storing an array into and array, I thought that would need a %hash. What is the significance of the [ ]?

After #Embolden headers, the line: my @color = @{ $days[$calnum] }; # the days to be colored
seems to be a hash of some sort but I'm afraid I don't quite get it. (I do get the fact that you are storing an array of dates and then extracting them, but I don't understand the mechanics).

I'm very impressed at the simplicity of what you have achieved compared to the Heath Robinson approach I had embarked upon - this looks like the real thing.

I have also been trying very hard to get the calendars to fill different rows:
the line  $t->cell( 0, $calnum )->push_content( $cals[$calnum] ); pushes all the calendars along a single row.

If we generate a new table:

# Generate container table my $t = new HTML::ElementTable ( maxrow => 12, maxcol => 3 );
then how can I get the calendars to fill across and then down to the next row?

By using  $t->cell( $calnum, $calnum )->push_content( $cals[$calnum] );
the calendars fill diagonally, and I had hoped that by using

# Populate container table for my $calnum ( 0 .. $#cals ) { my $row = int(my $calnum/4); $t->cell( 0, $calnum )->push_content( $cals[$calnum] ); }
that might do the trick, but I am left with a blank screen. In fact everything I have tried pretty much leaves me with a blank screen!!

If you have any ideas on the latter and perhaps give an explanation of the former I would be very grateful

Many thanks, though, for your help so far...


In reply to Re: Possible Solution for Generating a container table in HTML::CalendarMonth by jonnyfolk
in thread Generating a container table in HTML::CalendarMonth by jonnyfolk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.