ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Dynamic WDWTITLE Value Not Updating After EXFMT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dynamic WDWTITLE Value Not Updating After EXFMT

    Here is some code:

    DDS

    Code:
    A          R CALWIN                                                        
    A                                      WINDOW(4 10 15 41 *NOMSGLIN)        
    A                                      WDWTITLE((*TEXT &TITLE40) (*COLOR W-
    A                                      HT) (*DSPATR RI))                   
    A                                      WDWBORDER((*COLOR BLU) (*DSPATR RI)-
    A                                       (*CHAR '        '))                
    A                                      OVERLAY                             
    A                                      CF12(12)                            
    A                                      ROLLUP(70)                          
    A                                      ROLLDOWN(71)                        
    A                                      RTNCSRLOC(&CSRRCD &CSRFLD &CSRPOS)  
    A                                      RTNCSRLOC(*WINDOW &SCRROW &SCRCOL &-
    A                                      WDWROW &WDWCOL)                     
    A            TITLE40       40A  P                                          
    A** stuff
    A          R DUMMMY                    ASSUME   
    A                                      KEEP     
    A                                      OVERLAY  
    A                                  1  2' '
    RPG

    Code:
    TITLE40 = 'First Title'
    exfmt CALWIN
    TITLE40 = 'Second Title'
    exfmt CALWIN
    For some reason, the window will always display whatever the title was set to before the first EXFMT. Is there some other DDS keyword to tell it to replace the TITLE value? After looking at other people's examples of windows, they are not coding for a WDWTITLE, but instead creating a field inside the window that they use for the title.

  • #2
    Other than RTNCSRLOC is defined twice (not sure if that is allowed), this works fine. In my test, I removed both.
    I only use WDWTITLE for the top as well as the bottom on all windows.

    Regards

    Kit
    www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    Regards

    Kit
    http://www.ecofitonline.com
    DeskfIT - ChangefIT - XrefIT
    ___________________________________
    There are only 3 kinds of people -
    Those that can count and those that can't.

    Comment


    • #3

      I had issues with WDWTITLE a while back. Turned out that the user's version of Client Access was quite old.

      Comment


      • #4
        Originally posted by CRinger400 View Post
        I had issues with WDWTITLE a while back. Turned out that the user's version of Client Access was quite old.
        Chris, thanks for your response. However, we are using the latest and greatest (iAccess)

        Comment


        • #5
          Originally posted by kitvb1 View Post
          Other than RTNCSRLOC is defined twice (not sure if that is allowed), this works fine. In my test, I removed both.
          I only use WDWTITLE for the top as well as the bottom on all windows.

          Regards

          Kit
          www.ecofitonline.com
          DeskfIT - ChangefIT - XrefIT
          Kit,

          Thanks for your response. I had a funny feeling this may be a ptf issue. We are on 7.1 but not sure of our ptf levels.

          Comment


          • #6
            I suspect that you'll need to add the RMVWDW keyword... so that your DDS looks like this:

            Code:
                A          R CALWIN                                                        
                 A                                      RMVWDW                              
                 A                                      WINDOW(4 10 15 41 *NOMSGLIN)        
                 A                                      WDWTITLE((*TEXT &TITLE40) (*COLOR W-
                 A                                      HT) (*DSPATR RI))                   
                 A                                      WDWBORDER((*COLOR BLU) (*DSPATR RI)-
                 A                                       (*CHAR '        '))                
                 A                                      OVERLAY                             
                 A                                      CF12(12)                            
                 A                                      ROLLUP(70)                          
                 A                                      ROLLDOWN(71)                        
                 A*                                     RTNCSRLOC(&CSRRCD &CSRFLD &CSRPOS)  
                 A*                                     RTNCSRLOC(*WINDOW &SCRROW &SCRCOL &-
                 A*                                     WDWROW &WDWCOL)                     
                 A            TITLE40       40A  P                                          
                 A** stuff                                                                  
                 A          R DUMMMY                    ASSUME                              
                 A                                      KEEP                                
                 A                                      OVERLAY                             
                 A                                  1  2' '
            I would also remove the OVERLAY keywords (they seem pointless) and probably also the KEEP keyword. They aren't the cause of the problem (the problem is the old window is still there, so you have to remove it first with RMVWDW) but I don't see what good these keywords are doing... I suspect they are just there because someone was trying anything/everything to get something to work, and didn't really understand what they do. ASSUME in the dummy record and WINDOW in the window record should be all that's needed to make this overlay other displays.

            Comment


            • #7
              Sorry, I commented-out the RTNCSRLOC keywords because the variables weren't defined (and were unnecessary for this.) I forgot to un-comment them before posting...

              Comment

              Working...
              X