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

Re: [framescript-users] changing the para tag in table cells

Expand Messages
  • Jerald Morphew
    Michael, I had held back on adding code snippet in first email as I wasnt sure how much may be needed and what seemed enough was maybe too long.  See below
    Message 1 of 7 , Jan 26, 2010
    Michael,
    I had held back on adding code snippet in first email as I wasnt sure how much may be needed and what seemed enough was maybe too long.  See below for just small amount, complete subroutine is attached as ZIP. 
     

    Set vCell = vCell.NextCellInTbl;

    New Text NewVar(vTextLoc) Object(vCell) vAlpha;

    //JLM this is where to add change to cell para tag

    IF vAlpha <> '0'

    SET vCellPgf..Name = 'Alpha';

    ENDIF //end change




    From: Michael Müller-Hillebrand <mmh@...>
    To: framescript-users@yahoogroups.com
    Sent: Tue, January 26, 2010 2:28:49 AM
    Subject: Re: [framescript-users] changing the para tag in table cells

     

    Am 25.01..2010 um 14:52 schrieb Jerald Morphew:

    > I am using a script fills a table with information from a database and this is working fine. One cell in each row may contain text (or not) based on a flag field in the database. When the table cell is not empty I need to change the paragraph format from the default in the template to another (always the same) from the catalog. I placed the following line at the point where the cell is populated:
    > SET vCellPgf.Name = 'Alpha';
    > The result is that the format is changed only on the correct rows but it is occuring in the first cell of the row when it should be in the last cell of the row.
    >
    > Any advise is greatly appreciated.

    Jerry,

    It would be easier (read: currently it is not possible) if you would have shown us a little bit more of your code. E.g. we can't see how you proceed from cell to cell, but this apparently seems to be part of the problem...?

    - Michael

    --
    ____________ _________ _________ _________ _________ _________ _
    Michael Müller-Hillebrand: Dokumentation Technology
    Adobe Certified Expert, FrameMaker
    Consulting and Training, FrameScript, XML/XSL, Unicode
    Blog [de]: http://cap-studio. de/


  • Michael Müller-Hillebrand
    ... Yeah, the trick (to get a good answer) is to include enough for someone else to understand the problem, but not too much because it then might be to hard
    Message 2 of 7 , Jan 26, 2010
    • 0 Attachment
      Am 26.01.2010 um 17:31 schrieb Jerald Morphew:

      > [Attachment(s) from Jerald Morphew included below]
      >
      > Michael,
      > I had held back on adding code snippet in first email as I wasnt sure how much may be needed and what seemed enough was maybe too long.

      Yeah, the trick (to get a good answer) is to include enough for someone else to understand the problem, but not too much because it then might be to hard to grasp the problem in seconds. I am not going to download any extra stuff (too much work) and your sample seems too small.

      > See below for just small amount, complete subroutine is attached as ZIP.
      >
      > Set vCell = vCell.NextCellInTbl;

      I don’t see a loop advancing vCell from cell to cell.

      > New Text NewVar(vTextLoc) Object(vCell) vAlpha;
      > //JLM this is where to add change to cell para tag
      > IF vAlpha <> '0'
      > SET vCellPgf..Name = 'Alpha';

      This (assuming the double dots is a typo) is not the proper way to assign a paragraph format, it just changes the format name, but no other properties. You have to get the named PgfFmt object and assign its properties to the Pgf.

      > ENDIF //end change

      Also, indentation and removal of blank lines (I did this for the answer) make understanding code better.

      No offense, but everyone has other tasks to do, so it is in our common interest to spend as little time as possible with any problem.

      - Michael

      --
      _______________________________________________________________
      Michael Müller-Hillebrand: Dokumentations-Technologie
      Adobe Certified Expert, FrameMaker
      Lösungen und Training, FrameScript, XML/XSL, Unicode
      Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
    • Jerald Morphew
      Michael, Thanks, no offense taken. I will try give a more concise explanation of the problem. The existing code to populate the cells in the table works fine.
      Message 3 of 7 , Jan 26, 2010
      • 0 Attachment
        Michael,
        Thanks, no offense taken. I will try give a more concise explanation of the problem.
         
        The existing code to populate the cells in the table works fine. Proceeding from cell to cell using NextCellInTbl is not a problem. What is happening is that when I modify this working code to add the logic for changing the para tag name, the change is occuring not in the current cell but in the first cell of the same row.  (name change is sufficient as result is to use IXgen to make index on para tag)
         
        Set vCell = vCell.NextCellInTbl;    >>this line brings the focus to the correct cell to add desired text, looping is elsewhere
        New Text NewVar(vTextLoc) Object(vCell) vAlpha;   >>this line is putting the correct text in place, no problem here
        IF vAlpha <> '0'
                >>I added these 3 lines to change tag name while in desired cell before loop moves to next cell
        SET vCellPgf.Name = 'Alpha';
        ENDIF
         
        The addition of the 3 new lines has not upset the correct populating of the table cells. What has been puzzling me is that the format change is occuring on a cell in the same row but not the cell the new text was added to.  The condition check is also working, a change is made only if cell was poplated with some text. The correct cell gets the text but the wrong cell gets the Name change.
         
        Regards,
        Jerry


        From: Michael Müller-Hillebrand <mmh@...>
        To: framescript-users@yahoogroups.com
        Sent: Tue, January 26, 2010 11:43:32 AM
        Subject: Re: [framescript-users] changing the para tag in table cells

        Am 26.01.2010 um 17:31 schrieb Jerald Morphew:

        > [Attachment(s) from Jerald Morphew included below]
        >
        > Michael,
        > I had held back on adding code snippet in first email as I wasnt sure how much may be needed and what seemed enough was maybe too long.

        Yeah, the trick (to get a good answer) is to include enough for someone else to understand the problem, but not too much because it then might be to hard to grasp the problem in seconds. I am not going to download any extra stuff (too much work) and your sample seems too small.

        > See below for just small amount, complete subroutine is attached as ZIP.
        >
        > Set vCell = vCell.NextCellInTbl;

        I don’t see a loop advancing vCell from cell to cell.

        > New Text NewVar(vTextLoc) Object(vCell) vAlpha;
        > //JLM this is where to add change to cell para tag
        > IF vAlpha <> '0'
        > SET vCellPgf..Name = 'Alpha';

        This (assuming the double dots is a typo) is not the proper way to assign a paragraph format, it just changes the format name, but no other properties. You have to get the named PgfFmt object and assign its properties to the Pgf.

        > ENDIF //end change

        Also, indentation and removal of blank lines (I did this for the answer) make understanding code better.

        No offense, but everyone has other tasks to do, so it is in our common interest to spend as little time as possible with any problem.

        - Michael

        --
        _______________________________________________________________
        Michael Müller-Hillebrand: Dokumentations-Technologie
        Adobe Certified Expert, FrameMaker
        Lösungen und Training, FrameScript, XML/XSL, Unicode
        Blog: http://cap-studio.de/ - Tel.  +49 (9131) 28747  +49 (9131) 28747







        ------------------------------------

        ------------------------------------
            To post a message, email: framescript-users@yahoogroups.com
            To subscribe, email: framescript-users-subscribe@yahoogroups.com
            To unsubscribe, email: framescript-users-unsubscribe@yahoogroups.com
            To contact the list owner, email: framescript-users-owner@yahoogroups.com
            To change your email address or delivery options, visit: http://tech.groups.yahoo.com/group/framescript-users/
            To promote this group on your web site, visit: http://tech.groups.yahoo.com/group/framescript-users/promote
        Yahoo! Groups Links

        <*> To visit your group on the web, go to:
            http://groups.yahoo.com/group/framescript-users/

        <*> Your email settings:
            Individual Email | Traditional

        <*> To change settings online go to:
            http://groups.yahoo.com/group/framescript-users/join
            (Yahoo! ID required)

        <*> To change settings via email:
            framescript-users-digest@yahoogroups.com
            framescript-users-fullfeatured@yahoogroups.com

        <*> To unsubscribe from this group, send an email to:
            framescript-users-unsubscribe@yahoogroups.com

        <*> Your use of Yahoo! Groups is subject to:
            http://docs.yahoo.com/info/terms/


      • Michael Müller-Hillebrand
        Now I see... ... Where did you set vCellPgf? You are currently modifying vCell, so possibly you meant Set vCell.FirstPgf.Name = Alpha ; (Please double-check
        Message 4 of 7 , Jan 27, 2010
        • 0 Attachment
          Now I see...

          Am 26.01.2010 um 22:01 schrieb Jerald Morphew:

          > The existing code to populate the cells in the table works fine. Proceeding from cell to cell using NextCellInTbl is not a problem. What is happening is that when I modify this working code to add the logic for changing the para tag name, the change is occuring not in the current cell but in the first cell of the same row. (name change is sufficient as result is to use IXgen to make index on para tag)
          >
          > Set vCell = vCell.NextCellInTbl; >>this line brings the focus to the correct cell to add desired text, looping is elsewhere
          > New Text NewVar(vTextLoc) Object(vCell) vAlpha; >>this line is putting the correct text in place, no problem here
          > IF vAlpha <> '0' >>I added these 3 lines to change tag name while in desired cell before loop moves to next cell
          > SET vCellPgf.Name = 'Alpha';

          Where did you set vCellPgf? You are currently modifying vCell, so possibly you meant

          Set vCell.FirstPgf.Name = 'Alpha';

          (Please double-check if it is .FirstPgf or .FirstPgfInCell)

          HTH,

          - Michael

          > ENDIF
          >
          > The addition of the 3 new lines has not upset the correct populating of the table cells. What has been puzzling me is that the format change is occuring on a cell in the same row but not the cell the new text was added to. The condition check is also working, a change is made only if cell was poplated with some text. The correct cell gets the text but the wrong cell gets the Name change.
          >

          --
          _______________________________________________________________
          Michael Müller-Hillebrand: Dokumentations-Technologie
          Adobe Certified Expert, FrameMaker
          Lösungen und Training, FrameScript, XML/XSL, Unicode
          Blog: http://cap-studio.de/ - Tel. +49 (9131) 28747
        • Jerald Morphew
          That worked, problem solved. The generated index had correct output. Many thanks for the help Regards Jerry ________________________________ From: Michael
          Message 5 of 7 , Jan 27, 2010
          • 0 Attachment
            That worked, problem solved. The generated index had correct output. Many thanks for the help
             
            Regards
            Jerry


            From: Michael Müller-Hillebrand <mmh@...>
            To: framescript-users@yahoogroups.com
            Sent: Wed, January 27, 2010 5:23:51 AM
            Subject: Re: [framescript-users] changing the para tag in table cells

             

            Now I see...

            Am 26.01.2010 um 22:01 schrieb Jerald Morphew:

            > The existing code to populate the cells in the table works fine. Proceeding from cell to cell using NextCellInTbl is not a problem. What is happening is that when I modify this working code to add the logic for changing the para tag name, the change is occuring not in the current cell but in the first cell of the same row. (name change is sufficient as result is to use IXgen to make index on para tag)
            >
            > Set vCell = vCell.NextCellInTbl ; >>this line brings the focus to the correct cell to add desired text, looping is elsewhere
            > New Text NewVar(vTextLoc) Object(vCell) vAlpha; >>this line is putting the correct text in place, no problem here
            > IF vAlpha <> '0' >>I added these 3 lines to change tag name while in desired cell before loop moves to next cell
            > SET vCellPgf.Name = 'Alpha';

            Where did you set vCellPgf? You are currently modifying vCell, so possibly you meant

            Set vCell.FirstPgf. Name = 'Alpha';

            (Please double-check if it is .FirstPgf or .FirstPgfInCell)

            HTH,

            - Michael

            > ENDIF
            >
            > The addition of the 3 new lines has not upset the correct populating of the table cells. What has been puzzling me is that the format change is occuring on a cell in the same row but not the cell the new text was added to. The condition check is also working, a change is made only if cell was poplated with some text. The correct cell gets the text but the wrong cell gets the Name change.
            >

            --
            ____________ _________ _________ _________ _________ _________ _
            Michael Müller-Hillebrand: Dokumentations- Technologie
            Adobe Certified Expert, FrameMaker
            Lösungen und Training, FrameScript, XML/XSL, Unicode
            Blog: http://cap-studio. de/ - Tel.  +49 (9131) 28747  +49 (9131) 28747


          Your message has been successfully submitted and would be delivered to recipients shortly.