Code Comments
Programming Forum and web based access to our favorite programming groups.Expert Guide for Windows v2.9 is now available from my web site (see signature). Changes in this release include: o You can now drag a guide from the guide manager and drop it on the background of the main window to open a guide. o You can now drag a bookmark from the bookmark window and drop it on the background of the main window to open a bookmark. o You can now drag a hit from the global finder and drop it on the background of the main window to open the hit. o Implemented a "search" macro for the DDE support. o Added a clear facility to the bookmarks window. o Modified WEGLib so that the space RLE decoding code is a little paranoid and won't unroll silly numbers of spaces if someone has hard coded a number of RLE markers in a row in the source of a guide when they should probably have been coding them as ^CFF sequences. This fixes a problem that Klas Engwall found with the Funcky II Norton Guides (naughty Dirk!). -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this messageDave, There is one thing that need to fix. Sample below: ^A1CcpFileName^A1C: The name of the source database including full blah blah blah blah blah ...... blah blah blah. It is expected that the color stops after ^A1C, so beginning ":", text will be display in default color. But WEG treats the whole first line with ^A1C color attribute. Andi << Dave Pearson <davep.news@davep.org> wrote: Expert Guide for Windows v2.9 is now available from my web site (see signature). Changes in this release include: o You can now drag a guide from the guide manager and drop it on the background of the main window to open a guide. o You can now drag a bookmark from the bookmark window and drop it on thebackground of the main window to open a bookmark. o You can now drag a hit from the global finder and drop it on the background of the main window to open the hit. o Implemented a "search" macro for the DDE support. o Added a clear facility to the bookmarks window. o Modified WEGLib so that the space RLE decoding code is a little paranoid and won't unroll silly numbers of spaces if someone has hard coded a number of RLE markers in a row in the source of a guide when they should probably have been coding them as ^CFF sequences. This fixes a problem that Klas Engwall found with the Funcky II Norton Guides (naughty Dirk!).
Post Follow-up to this message* Andi Jahja <somewhere@internet.com>: > There is one thing that need to fix. Sample below: > > ^A1CcpFileName^A1C: The name of the source database including > full blah blah blah blah blah ...... blah blah blah. > > It is expected that the color stops after ^A1C, so beginning ":", text > will be display in default color. But WEG treats the whole first line with > ^A1C color attribute. To the best of my knowledge that isn't how colour attributes are supposed to work in Norton Guides. ^A simply sets a colour. If you want to revert back to a normal colour you should use ^N. Actually, I've just checked the Expert Help manual regarding creating NG databases and it confirms this. ^A is supposed to just set a colour, not unset it. -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this messageWell it is not a big deal anyway. But if you compiled the example that I posted and browse it with NG.EXE and WEG.EXE than you'll see the difference. Thanks for your time creating this great reader. Andi << Dave Pearson <davep.news@davep.org> wrote: * Andi Jahja <somewhere@internet.com>: > There is one thing that need to fix. Sample below: > > ^A1CcpFileName^A1C: The name of the source database including > full blah blah blah blah blah ...... blah blah blah. > > It is expected that the color stops after ^A1C, so beginning ":", text > will be display in default color. But WEG treats the whole first line with > ^A1C color attribute. To the best of my knowledge that isn't how colour attributes are supposed to work in Norton Guides. ^A simply sets a colour. If you want to revert back to a normal colour you should use ^N. Actually, I've just checked the Expert Help manual regarding creating NG databases and it confirms this. ^A is supposed to just set a colour, not unset it.
Post Follow-up to this message* Andi Jahja <somewhere@internet.com>: > Well it is not a big deal anyway. But if you compiled the example that I > posted and browse it with NG.EXE and WEG.EXE than you'll see the > difference. Most curious. According to all of the documentation I've ever seen regarding creating NGs I've never seen this behaviour described. I wonder, does anyone have any guide creation documentation for the original NG compiler? Does it say anything about this? If this is how it is actually supposed to work then I'd prefer to ensure that WEGLib does the correct thing. > Thanks for your time creating this great reader. My pleasure; thanks for taking the time to test it. -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this message<< Dave Pearson <davep.news@davep.org> wrote: Most curious. According to all of the documentation I've ever seen regarding creating NGs I've never seen this behaviour described. I wonder, does anyone have any guide creation documentation for the original NG compiler? Does it say anything about this? If this is how it is actually supposed to work then I'd prefer to ensure that WEGLib does the correct thing. > Thanks for your time creating this great reader. My pleasure; thanks for taking the time to test it. The following is a copy of the original NG compiler (not Expert Help): -- cut -- ^ Character Attributes Purpose The ^ character is an escape character used to enter special characters and character attributes--such as boldface, underlined, and reverse video. Format ^b Bold attribute ^n Normal attribute ^r Reverse video attribute ^u Underline (different color on color screen) ^^ Display the ^ character ^Axx Turn on attribute specified by the hexadecimal number xx ^Cxx Display character specified by the hexadecimal number xx The letters can be either uppercase or lowercase; for example, ^b or ^B. Description The caret character is used for two different purposes: to change character attributes (for example, bold or underline); and to display special characters (for example, the symbol for ASCII 9, which is normally treated as a Tab, rather than displayed). Setting Character Attributes You can include underline, bold, reverse video and other attributes in the text of both long and short entries by surrounding the text with the desired caret-character pair. For example, the following line would appear in the Guides window in bold: ^bThis line is boldface.^b Note: You should actually type the caret character (the shifted 6 key), rather than holding down the Ctrl key and typing the letter. (If you actually want the characters ^B to appear in the text, rather than turning on boldface, type two carets: ^^B.) Only one attribute can be on at a time. For example, if bold is on, turning on underline automatically turns off bold. Attributes are also automatically turned off at the end of each line. Only four attributes--normal, bold, underline, and reverse video--are defined for all monitors; these attributes are translated to display reasonably on all monitors. In addition to these four attributes, you can insert any arbitrary attribute using the ^Axx sequence, where xx is the hexadecimal value of the attribute you wish to set. Unlike the basic attributes, ^Axx attributes; are not translated for the different monitors. This means that attributes visible as colors on a color screen may not appear at all on a monochrome display. Displaying Special Characters The ^Cxx sequence displays any ASCII character. This is useful when you want to display a character that you can't enter with your word processor. For example, ASCII 13 is normally interpreted as carriage return. The IBM PC can display ASCII 13 as a musical note, however. To display the musical note, use (0D hex = 13 decimal). Other characters that are often hard to enter are (Backspace), (Tab), (Line Feed). -- cut -- Andi
Post Follow-up to this messageDave Pearson <davep.news@davep.org> wrote: > * Andi Jahja <somewhere@internet.com>: > > > Most curious. According to all of the documentation I've ever seen regardi ng > creating NGs I've never seen this behaviour described. I wonder, does anyo ne > have any guide creation documentation for the original NG compiler? Does i t > say anything about this? If this is how it is actually supposed to work th en > I'd prefer to ensure that WEGLib does the correct thing. Nothing official, but Morten Elling's NGX and its compiler behave as Andi says they should. Its documentation says both that ^aNN color NN (hexadecimal number) and that A color attribute is in effect until it is changed or until the end of the line... which seem, to me, to contradict this behaviour. Richard
Post Follow-up to this message* Andi Jahja <somewhere@internet.com>: > The following is a copy of the original NG compiler (not Expert Help): Thanks, it seems that I do have this documentation to hand (it's a NG I got sent once but I wasn't sure what the source was). > ^Axx Turn on attribute specified by the hexadecimal > number xx This doesn't seem to suggest that it should turn off a previous ^A of the same value. -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this message* Richard Bos <rlb@hoekstra-uitgeverij.nl>: > Nothing official, but Morten Elling's NGX and its compiler behave as > Andi says they should. Its documentation says both that > ^aNN color NN (hexadecimal number) > and that > A color attribute is in effect until it is changed or until the end of > the line... > which seem, to me, to contradict this behaviour. Yup, all the documentation I've ever seen (and, I think, any other NG oriented code I've ever seen) works such that ^A doesn't force a ^N if the ^A happens when one of the previous value is in effect. I think I'll stick with the documented approach. -- Dave Pearson | OSLib - Timeslice release functions. http://www.davep.org/ | eg - Norton Guide reader for Linux . http://www.davep.org/clipper/ | weg - Norton Guide reader for Windo ws. http://www.davep.org/norton-guides/ | dgscan - DGROUP scanner for Clipper.
Post Follow-up to this messageBut I'm pretty sure that you also observed the followings: Setting Character Attributes You can include underline, bold, reverse video and other attributes in the text of both long and short entries by surrounding the text with the desired caret-character pair. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ And that suggests that the last part of the pair turns off the attribute, after the first part of it, turns it on. Andi << Dave Pearson <davep.news@davep.org> wrote: * Andi Jahja <somewhere@internet.com>: > The following is a copy of the original NG compiler (not Expert Help): Thanks, it seems that I do have this documentation to hand (it's a NG I got sent once but I wasn't sure what the source was). > ^Axx Turn on attribute specified by the hexadecimal > number xx This doesn't seem to suggest that it should turn off a previous ^A of the same value.
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.