Loading ...
Sorry, an error occurred while loading the content.

3-Column Table

Expand Messages
  • Ray Shapp
    To All, Win7 Pro SP1 64-bit, NTB Pro 6.2/fv Maybe the following can be performed with CSS rather than a clip. What s your advice? I want to create a 3-column
    Message 1 of 39 , Mar 9, 2011
    • 0 Attachment
      To All,

      Win7 Pro SP1 64-bit, NTB Pro 6.2/fv

      Maybe the following can be performed with CSS rather than a clip. What's
      your advice?

      I want to create a 3-column table from about 30 to 50 blocks of HTML markup.
      Each block begins with "<td" and ends with "</td>". Each block of markup is
      separated from the next block by at least one blank line. For simplicity,
      the result can be just a series of <tr>...</tr> tags where the ellipsis
      represents three of the <td> blocks (except that the bottom row may have
      only two or one <td> block). Given this result, I would just copy and paste
      it into a template of a complete HTML page. Each block contains a thumbnail
      photo and year, make, and model of a vehicle with a link to a photo album.
      Some of the blocks contain descriptive text pertaining to the vehicle.

      You can see what the blocks look like at the following address where all 39
      current projects are shown on one very wide row in a table:

      http://www.classiccars.ws/projects/Sort%20Projects.htm (Note: the
      public doesn't normally see this page.)

      Can CSS arrange these blocks into rows of three blocks each? By coincidence,
      the current number of blocks is evenly divisible by 3, but that's not always
      true. I named the page "Sort Projects", but no sorting is involved. I
      manually place blocks representing new projects at top left, and all other
      blocks are shifted one position towards the right. If significant work is
      done on a vehicle, the block for that vehicle is moved to top left. When a
      restoration is complete, the block for that vehicle can be deleted, and that
      deletion can occur at any position among the blocks.

      If CSS can't do the positioning, the following outline for a clip might work
      (beginnng with a blank "output" document:

      :Start
      write a string: <tr valign="middle">
      Find a block at current cursor location in current document. If no blocks
      remain, quit. Otherwise, write the block to output.
      Find a block at current cursor location in current document. If no blocks
      remain, quit. Otherwise, write the block to output.
      Find a block at current cursor location in current document. If no blocks
      remain, quit. Otherwise, write the block to output.
      write a string: </tr>
      Go to :Start

      I will write a final "</tr>" manually, if necessary, and then manually paste
      the output document into a template of my final web page.

      The following Regular expression will find a complete <td> block only if the
      block is joined into a single line:

      <td.*?</td> with options [RSOI]

      I tried to make it ignore line breaks using the following Regex, but it
      doesn't work:

      <td.*?\s</td>

      Thank you for your advice.

      Ray Shapp


      [Non-text portions of this message have been removed]
    • Eb
      Let me add to this, that NoteTab s clips started out as blocks of text, assigned to a keyword (the clip name). Even though clips can do much more than those
      Message 39 of 39 , Apr 5, 2011
      • 0 Attachment
        Let me add to this, that NoteTab's clips started out as blocks of text, assigned to a keyword (the clip name). Even though clips can do much more than those original ones, that early feature is still available, and a mix of text and clip code as well.

        In other words, this is not a designe error, but an evolution, where powerful features ware added, along with backward compatibility.

        The need to watch for blank lines in your code is at worst a trade-off for more features.

        By the way, Ray figured out one of the workarounds - jumping to a label, rather than SKIPping. Another workaround is to place semicolons at the start of every blank line, if its only purpose is to make the code more readable.


        Cheers,


        Eb

        --- In ntb-clips@yahoogroups.com, hsavage <hsavage@...> wrote:
        >
        > Axel Berger wrote:
        > > Ray Shapp wrote:
        > >> That looks dangerous because a person might add a few blank
        > >> lines to a clip to make it more legible,
        > >
        > > Begob, you're right! I was convinced that NoteTab would do the right
        > > thing and ignore emty lines, but it doesn't:
        > >
        > > ^!IfSame 1 1 Skip
        > >
        > > ^!Continue Not skipped
        > > ^!Continue skipped
        > >
        > > To me this is a design error and an important point to keep in mind.
        > >
        > > Thanks
        > > Axel
        >
        > Axel, Ray,
        >
        > It is stated in NoteTab help that only 'commented lines, those
        > beginning with semi-colon are not counted during clip execution.
        >
        > SKIP
        > will skip the next instruction (text and blank lines are counted, but
        > not commented lines).
        >
        >
        > ···············································
        > ¤• JD#...91 - ¤• SL...727 - 11.04.01~19.38.19
        >
        > • If you write "WASH ME" on my truck,
        > • I'll carve "RESUSCITATE ME" on your chest!!!
        >
        > € hrs € hsavage € pobox € com
        >
        > ^!Skip
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.