ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Changing comment color

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

  • Changing comment color

    We have a new standard in our department, it is to add a special header to the top of programs detailing some important information. The standard calls for it to be purple to catch special attention. I am the only one using RDI at the moment and I can't figure out if there is a way for me to color code those comments that way.

  • #2
    Re: Changing comment color

    Hi JJ:

    This may be of help:



    Best of luck
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

    Comment


    • #3
      Re: Changing comment color

      The problem is trying to get the color coding to cross between SEU and RDI. We can get in SEU but that does not show in RDI and if I code it in RDI I can't change the color. The hex at the beginning of the line causes problems in RDI.

      Probably not going to come out with a good solution here.

      Comment


      • #4
        Re: Changing comment color

        When I work with RDi on a program that has colored comments and need to add another one, I just copy a colored line from another place in the program (or from another program that has colors) and then I edit the text. You could create a shell program that has lines of all colors and just copy from that as needed. You can also select colored lines in a source member and create a snippet. I tested that and it actually preserved the colors.

        Comment


        • #5
          Re: Changing comment color

          I tried opening a source with color coded comments and they all come out regular green. I have tried copying them several ways and have not been able to get the color to come across. Could just be me though.
          Last edited by jj_dahlheimer; June 12, 2015, 01:08 PM.

          Comment


          • #6
            Re: Changing comment color

            I was assuming that SEU users are inserting a hex character to color the lines. You won't see the color in RDi, but you should see a funny character (don't know if it has a name) where the hex code is, depending on what version of RDi you are using (in some earlier versions the hex code was not getting rendered). If you copy those colored lines in RDi and save them, you should see the color in SEU, but you won't see it in RDi, just the funny character.

            Comment


            • #7
              Re: Changing comment color

              You will see something like the following image in RDi. I don't know that there is a way to color this in RDi. In my opinion this really shouldn't be done like this. It will encourage the use a tool that is obsolete just b/c of coloring. I don't really have a great answer as to how to go about it though.

              Click image for larger version

Name:	comments.png
Views:	1
Size:	6.1 KB
ID:	126804

              Comment


              • #8
                Re: Changing comment color

                The obvious solution, at least from IBM's point of view, is for everybody to use RDi.

                Comment


                • #9
                  Re: Changing comment color

                  I don't see the special characters like that in the comments that have color coding. I do notice though that the lines will get their positioning off which is really hard on the eyeballs. All the comments start at the same position but because the special character cannot be displayed it looks like some lines start a position before the others.

                  I would agree everyone should go to RDI, though I would also argue that being able to color code the comments would be a nice to have feature as long as someone does not go overboard with it. But probably the better way to go would be to have a special header that draws attention rather than go down the color route.

                  Comment


                  • #10
                    Re: Changing comment color

                    What version of RDi are you using? The special characters were present in earlier versions of RDi/RDp but disappeared and the source lines appeared to shift left when Windows 7 was released. They reappeared in one of the last releases of RDi so if you aren't on a recent release, you won't see them.

                    Comment


                    • #11
                      Re: Changing comment color

                      The ability to insert special characters into the comments to make colors appear was never a "planned feature". What you're inserting are 5250 attribute codes. The way the system tells a 5250 terminal what to display on the screen is by sending a series of hex "escape codes" telling the terminal to tell it what to do. You are manually adding 5250 escape codes into your source, tricking the terminal into thinking it's getting a request from the system to change colors. The terminal isn't smart enough to know the difference between a control character from the terminal controller vs. embedded hex data in your printed text.

                      The "right" way to have colors has always been for the editor to colorize the source as you're viewing it. This is not just RDi, but CODE/400 before it as well as 3rd party tools like RPG-Alive. It's also the way things are done in all other platforms, such as Windows Visual Studio, and has gone back to the old days. Anyone remember using stuff like Borland C or Turbo C on DOS? Even back then they did it that way, colorizing the source.

                      Only in the 5250 world do you see people manually inserting terminal escape sequences into their data. This is not a good way to move forward, as using these sequences means that things will not work using any other way of editing your source -- and remmeber, IBM has already stabilized SEU/PDM, and there have been no enhancements to it since V6R1 was released more than 7 years ago. Do you really want to lock yourself into that solution going forward?!

                      Comment


                      • #12
                        Re: Changing comment color

                        Version 9.0.1. Running windows 7. That probably explains a lot.

                        I would agree and I have brought it up that the hex color coding method is not the right way.

                        Comment


                        • #13
                          Re: Changing comment color

                          There is a newer RDi -- version 9.1.x. You can't just 'update' to it, though (at least, I couldn't) you have to get the newest version from ESS (or however you get your install media from IBM) and install it.

                          Comment


                          • #14
                            Re: Changing comment color

                            Originally posted by Scott Klement View Post
                            There is a newer RDi -- version 9.1.x. You can't just 'update' to it, though (at least, I couldn't) you have to get the newest version from ESS (or however you get your install media from IBM) and install it.
                            We couldnt either, which was a pain. We initially installed the 9.0.1 from media, then had to reinstall 9.1 from media again in order to get the support for free format d-specs.
                            Michael Catalani
                            IS Director, eCommerce & Web Development
                            Acceptance Insurance Corporation
                            www.AcceptanceInsurance.com
                            www.ProvatoSys.com

                            Comment


                            • #15
                              We are on Rdi V9.5 and our coloured control codes in comments do not show a character/or take up a space, so the alignment it wrong.

                              I have to swap between Client Access and RDI, on different machines and I must admit that I do really miss the colours in comments, as they really help seperate Important comments (White) from incremental comments (I use Blue).

                              I get the comments above from Scott, but I always thought our coloured comments were one-upmanship on other editors, and still put them in when working on the green screens.
                              In RDI - we just have to put big blocks (using * and --- etc) around comments we want to stand out.

                              What do others use on their comments in Rdi?

                              Comment

                              Working...
                              X