Announcement

Collapse
No announcement yet.

dictionary

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

  • dictionary

    The Dictionary file is getting rather huge. Right now we're collating VB6 terms to PBWin terms and identifying the ones that will require wrappers to achieve similar effect. This is the latest communication between myself and Rod, who is building the dictionary. I've uploaded my latest copy of the of the dictionary. Please keep in mind that this will be obsolete by the time you read this post. The latest official versions of all the files are in the SVN repository.

    Stan




    Just got the email just now, I'll get back to you on the contents. It might have been part of what I'm looking for as well. I have a feeling that the dictionary may end up being a lot larger than we anticipated. It may take me a day or two assimilate.

    I take it you decided not to post anything on the Cafe?
    I don't know what we could say other than what you originally suggested.

    I may post my reply in the Private forum just so PB knows we're still kicking and fighting with the BASIC beast.

    Rod
    ----- Original Message -----
    From: Stan
    To: Rod

    Sent: Wednesday, July 16, 2008 8:22 AM
    Subject: VB6 keywords, objects, functions, and events


    Hi Rod,

    This list is not complete yet, but it's getting fairly long. Would you mind taking a look at it and maybe suggesting a way to include these VB6 terms in the dictionary? Let me know. The headers are in square brackets [Objects] and everything between headers belongs to the header above it. I'm taking this directly out of the MSDN CD that shipped with VB6 Pro back in 2003 (my copy).

    I've attached a version of the dictionary with all the PBWin keywords added (no VB6 equivalents yet). How do you think we should deal with these?

    Thanks for all your hard work.

    The parser is posted in BRANCHES on the SVN. First draft of the Tokenizer is there too, but there's not much to that. Hopefully I'll get a working version in there in the next day or two.

    Any issues? Need any help? Let me know. Hasn't been much activity on the Converter forum lately, so I decided I would contact you this way.

    Thanks,
    Stan
    Attached Files
    Do not go quiet into that good night,
    ... Rage, rage against the dark.

  • #2
    Rod,

    What's the status of the dictionary with the new format? Have you been able to update it, or do you need some help? I'm at a critical point in the Tokenizer -- need the dictionary fairly soon to make progress.

    Stan
    Do not go quiet into that good night,
    ... Rage, rage against the dark.

    Comment


    • #3
      Here's a quick & dirty converter for the DCT file over to your new format. It doubles the size of the dictionary (expected), but runs very fast. Just saves the work you've already done into the new format.

      Code:

      DO NOT USE THIS CODE !!! Serious bugs! Will fix & repost.
      We have a slight miscommunication about this, and it has been worrying me. I was waiting for your update. Will sort this out and have something for you to peruse in a couple of days.
      I wasn't sure if your PM meant I should hold off on everything, so while I didn't do much work on this, I did get some thinking done about it.
      Sorry, I should have enquired.
      Rod
      I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

      Comment


      • #4
        Originally posted by Rodney Hicks View Post
        We have a slight miscommunication about this, and it has been worrying me. I was waiting for your update. Will sort this out and have something for you to peruse in a couple of days.
        I wasn't sure if your PM meant I should hold off on everything, so while I didn't do much work on this, I did get some thinking done about it.
        Sorry, I should have enquired.
        My fault probably. I've got a lot of things on my mind right now. Noticed that my communications are not as clear as before. Thanks for replying.

        I'll put the updated Dictionary Tool on the front burner again.

        Stan
        Do not go quiet into that good night,
        ... Rage, rage against the dark.

        Comment


        • #5
          Stan,
          Carry on with some of the other stuff, I can whip up a tool that will create the file for reading, writing, adding, adjusting, reworking, etc.
          There is no need for you to do everything, especially mundane stuff like this.
          I know you have a lot to get done with all various aspects, so I'll get something that gets the job done.
          Rod
          I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

          Comment


          • #6
            Rod,
            Thanks. I appreciate that.
            Do not go quiet into that good night,
            ... Rage, rage against the dark.

            Comment


            • #7
              Rod,

              Finished the list of VB6 terms. Unzipped it's 146K. Just a list. Format is

              [CATEGORY]
              TERM TYPE COMMENT
              ...
              ...

              Down in the CONSTANTS part of the list the format is

              [CATEGORY]
              TYPE COMMENT
              - SUBTYPE COMMENT
              -- CONSTANT VALUE COMMENT
              -- ...
              -- ...

              Some CONSTANT TYPEs don't have SUBTYPEs, format there is

              TYPE COMMENT
              - CONSTANT VALUE COMMENT
              - ...
              - ...

              COMMENTs are optional, but there are a lot of them.

              Stan
              Attached Files
              Do not go quiet into that good night,
              ... Rage, rage against the dark.

              Comment


              • #8
                Rod, take a look at this...

                Rod,

                I've been working with the list I made for your dictionary work. I finally got through the whole VB6 Language Reference this weekend. Take another look at the whole list. Today, I'm thinking maybe there's enough information in this format. Let me know if you think we can work with this in the short term.

                First few lines of the txt file explain the format. I've used the pipe character (|) as a field delimiter. That way the comments were just cut-and-paste from the VB6 Language Reference. I've only made a very few minor notes of my own.
                Attached Files
                Do not go quiet into that good night,
                ... Rage, rage against the dark.

                Comment


                • #9
                  Stan,

                  Took a look at the contents of this file and I must say there's alot there. How were you planning on handling some of the VB methods? My thought on this is to code up some replacement functions (or MACROs) to handle the intent of the processing chore. For example, we could code up a function to handle the QBColor method, even call it the same name and just #INCLUDE it at the beginning of the project. I think there may be many VB methods in this list that could be "converted" in much the same way.

                  Just a thought.
                  Later...

                  JR

                  "When governments fear the people there is liberty. When people fear the government there is tyranny." - Thomas Jefferson

                  Comment


                  • #10
                    Originally posted by John R. Heathcote View Post
                    ...
                    How were you planning on handling some of the VB methods? My thought on this is to code up some replacement functions (or MACROs) to handle the intent of the processing chore....

                    We are thinking the same way. Here's an example of how I'm doing it using the VB6 AmbientProperties Object. It's one of the simpler ones, only requires a GET and SET method. I think the same style can be used for most methods and classes.

                    My idea was to put this file in a code source template directory to get included into the output file. Copied into the output directory with the #INCLUDE statement as you suggest is a better way.

                    Code:
                    'vb2pb Converter
                    'VB6 Objects for PBWin 8.04
                    '    AmbientProperties object simulation
                    '===================================================================================================================
                    '   *** DECLARES ***
                    '===================================================================================================================
                    
                    'Ambient Properties Object
                    DECLARE SUB Get_AmbientPropertiesObject(BackColor AS DWORD, _               'color #
                                                            DisplayAsDefault AS LONG, _         'boolean
                                                            DisplayName AS STRING, _            'control name, default = ""
                                                            objFont AS FontObjectType, _
                                                            ForeColor AS DWORD, _               'color #
                                                            LocaleID AS LONG, _                 'language code of user
                                                            MessageReflect AS LONG, _           'boolean
                                                            objPalette AS PictureObjectType, _
                                                            RightToLeft AS LONG, _              'boolean
                                                            ScaleUnits AS STRING, _             'default = ""
                                                            ShowGrabHandles AS LONG, _          'boolean
                                                            ShowHatching AS LONG, _             'boolean
                                                            SupportMnemonics AS LONG, _         'boolean
                                                            TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                            UserMode AS LONG, _                 'boolean, True = mode not supported
                                                            UIDead AS LONG)                     'boolean, False = mode not supported
                    
                    DECLARE SUB Set_AmbientPropertiesObject(BackColor AS DWORD, _               'color #
                                                            DisplayAsDefault AS LONG, _         'boolean
                                                            DisplayName AS STRING, _            'control name, default = ""
                                                            objFont AS FontObjectType, _
                                                            ForeColor AS DWORD, _               'color #
                                                            LocaleID AS LONG, _                 'language code of user
                                                            MessageReflect AS LONG, _           'boolean
                                                            objPalette AS PictureObjectType, _
                                                            RightToLeft AS LONG, _              'boolean
                                                            ScaleUnits AS STRING, _             'default = ""
                                                            ShowGrabHandles AS LONG, _          'boolean
                                                            ShowHatching AS LONG, _             'boolean
                                                            SupportMnemonics AS LONG, _         'boolean
                                                            TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                            UserMode AS LONG, _                 'boolean, True = mode not supported
                                                            UIDead AS LONG)                     'boolean, False = mode not supported
                    '-------------------------------------------------------------------------------------------------------------------
                    
                    
                    
                    '===================================================================================================================
                    '   *** TYPES ***
                    '===================================================================================================================
                    
                    TYPE FontObjectType
                        Bold AS LONG            'boolean
                        CharSet AS LONG         'integer ID of Character Set to use
                        Italic AS LONG          'boolean
                        FontName AS STRING      'name of a form, control, or data access object
                        FontSize AS LONG        'size in points
                        StrikeThrough AS LONG   'boolean
                        Underline AS LONG       'boolean
                        Weight AS LONG          'boolean
                    
                        'additional code required for "PRIVATE SUB object_FontChanged(BYVAL propertyName AS STRING)"
                        FontActive AS LONG      'boolean, check this value to simulate Event
                    END TYPE
                    
                    
                    '===================================================================================================================
                    '   *** Equates ***
                    '===================================================================================================================
                    
                    
                    '===================================================================================================================
                    '   *** Globals ***
                    '===================================================================================================================
                    
                        GLOBAL Picture AS LONG  'see PictureObject under ENUM below, use equates for PictureObject, not a true object
                    
                    '===================================================================================================================
                    '   *** Set ENUM Values ***
                    '===================================================================================================================
                        'PictureObject           'This is actually a VB6 ENUM
                        %vbPicTypeNone = 0       '0 Icon type of Picture object
                        %vbPicTypeBitmap = 1     '1 Bitmap type of Picture object
                        %vbPicTypeMetafile = 2   '2 Metafile type of Picture object
                        %vbPicTypeIcon = 3       '3 Icon type of Picture object
                        %vbPicTypeEMetaFile = 4  '4 Enhanced metafile type of Picture object
                    
                    '===================================================================================================================
                    '   *** Event Simulators ***
                    '===================================================================================================================
                    
                    
                    '===================================================================================================================
                    '   *** Object Simulators ***
                    '===================================================================================================================
                    
                    'Ambient Properties Object
                    SUB AmbientPropertiesObject(Action AS LONG, _                   'from GET/SET subs, determine action to take
                                                BackColor AS DWORD, _               'color #
                                                DisplayAsDefault AS LONG, _         'boolean
                                                DisplayName AS STRING, _            'control name, default = ""
                                                objFont AS FontObjectType, _
                                                ForeColor AS DWORD, _               'color #
                                                LocaleID AS LONG, _                 'language code of user
                                                MessageReflect AS LONG, _           'boolean
                                                objPalette AS PictureObjectType, _
                                                RightToLeft AS LONG, _              'boolean
                                                ScaleUnits AS STRING, _             'default = ""
                                                ShowGrabHandles AS LONG, _          'boolean
                                                ShowHatching AS LONG, _             'boolean
                                                SupportMnemonics AS LONG, _         'boolean
                                                TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                UserMode AS LONG, _                 'boolean, True = mode not supported
                                                UIDead AS LONG) _                   'boolean, False = mode not supported
                    
                        STATIC dwdBackColor AS DWORD
                        STATIC lDisplayAsDefault AS LONG
                        STATIC udtFont AS FontObjectType
                        STATIC dwdForeColor AS DWORD
                        STATIC lLocaleID AS LONG
                        STATIC lMessageReflect AS LONG
                        STATIC udtPalette AS PictureObjectType
                        STATIC lRightToLeft AS LONG
                        STATIC sScaleUnits AS STRING
                        STATIC lShowGrabHandles AS LONG
                        STATIC lShowHatching AS LONG
                        STATIC lSupportMnemonics AS LONG
                        STATIC lTextAlign AS LONG
                        STATIC lUserMode AS LONG
                        STATIC lUIDead AS LONG
                    
                        IF Action = 0 THEN
                            BackColor = dwdBackColor
                            DisplayAsDefault = lDisplayAsDefault
                            DisplayName lDisplayAsDefault
                            TYPE SET objFont = udtFont
                            ForeColor = dwdForeColor
                            LocaleID = lLocaleID
                            MessageReflect = lMessageReflect
                            TYPE SET objPalette = udtPalette
                            RightToLeft = lRightToLeft
                            ScaleUnits = sScaleUnits
                            ShowGrabHandles = lShowGrabHandles
                            ShowHatching = lShowHatching
                            SupportMnemonics = lSupportMnemonics
                            TextAlign = lTextAlign
                            UserMode = lUserMode
                            UIDead = lUIDead
                        ELSEIF Action = 1 THEN
                            dwdBackColor = BackColor
                            lDisplayAsDefault = DisplayAsDefault
                            TYPE SET udtFont = objFont
                            dwdForeColor = ForeColor
                            lLocaleID = LocaleID
                            lMessageReflect = MessageReflect
                            TYPE SET udtPalette = objPalette
                            lRightToLeft = RightToLeft
                            sScaleUnits = ScaleUnits
                            lShowGrabHandles = ShowGrabHandles
                            lShowHatching = ShowHatching
                            lSupportMnemonics = SupportMnemonics
                            lTextAlign = TextAlign
                            lUserMode = UserMode
                            lUIDead = UIDead
                        END IF
                    END SUB
                    
                    SUB Set_AmbientPropertiesObject(BackColor AS DWORD, _               'color #
                                                    DisplayAsDefault AS LONG, _         'boolean
                                                    DisplayName AS STRING, _            'control name, default = ""
                                                    objFont AS FontObjectType, _
                                                    ForeColor AS DWORD, _               'color #
                                                    LocaleID AS LONG, _                 'language code of user
                                                    MessageReflect AS LONG, _           'boolean
                                                    objPalette AS PictureObjectType, _
                                                    RightToLeft AS LONG, _              'boolean
                                                    ScaleUnits AS STRING, _             'default = ""
                                                    ShowGrabHandles AS LONG, _          'boolean
                                                    ShowHatching AS LONG, _             'boolean
                                                    SupportMnemonics AS LONG, _         'boolean
                                                    TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                    UserMode AS LONG, _                 'boolean, True = mode not supported
                                                    UIDead AS LONG) _                   'boolean, False = mode not supported
                    
                        LOCAL Action AS LONG
                        Action = 1
                        CALL AmbientPropertiesObject(Action AS LONG, _                   'from GET/SET subs, determine action to take
                                                     BackColor AS DWORD, _               'color #
                                                     DisplayAsDefault AS LONG, _         'boolean
                                                     DisplayName AS STRING, _            'control name, default = ""
                                                     objFont AS FontObjectType, _
                                                     ForeColor AS DWORD, _               'color #
                                                     LocaleID AS LONG, _                 'language code of user
                                                     MessageReflect AS LONG, _           'boolean
                                                     objPalette AS PictureObjectType, _
                                                     RightToLeft AS LONG, _              'boolean
                                                     ScaleUnits AS STRING, _             'default = ""
                                                     ShowGrabHandles AS LONG, _          'boolean
                                                     ShowHatching AS LONG, _             'boolean
                                                     SupportMnemonics AS LONG, _         'boolean
                                                     TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                     UserMode AS LONG, _                 'boolean, True = mode not supported
                                                     UIDead AS LONG) _                   'boolean, False = mode not supported
                    END SUB
                    
                    
                    SUB Get_AmbientPropertiesObject(BackColor AS DWORD, _               'color #
                                                    DisplayAsDefault AS LONG, _         'boolean
                                                    DisplayName AS STRING, _            'control name, default = ""
                                                    objFont AS FontObjectType, _
                                                    ForeColor AS DWORD, _               'color #
                                                    LocaleID AS LONG, _                 'language code of user
                                                    MessageReflect AS LONG, _           'boolean
                                                    objPalette AS PictureObjectType, _
                                                    RightToLeft AS LONG, _              'boolean
                                                    ScaleUnits AS STRING, _             'default = ""
                                                    ShowGrabHandles AS LONG, _          'boolean
                                                    ShowHatching AS LONG, _             'boolean
                                                    SupportMnemonics AS LONG, _         'boolean
                                                    TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                    UserMode AS LONG, _                 'boolean, True = mode not supported
                                                    UIDead AS LONG) _                   'boolean, False = mode not supported
                        LOCAL Action AS LONG
                        Action = 0
                        CALL AmbientPropertiesObject(Action AS LONG, _                   'from GET/SET subs, determine action to take
                                                     BackColor AS DWORD, _               'color #
                                                     DisplayAsDefault AS LONG, _         'boolean
                                                     DisplayName AS STRING, _            'control name, default = ""
                                                     objFont AS FontObjectType, _
                                                     ForeColor AS DWORD, _               'color #
                                                     LocaleID AS LONG, _                 'language code of user
                                                     MessageReflect AS LONG, _           'boolean
                                                     objPalette AS PictureObjectType, _
                                                     RightToLeft AS LONG, _              'boolean
                                                     ScaleUnits AS STRING, _             'default = ""
                                                     ShowGrabHandles AS LONG, _          'boolean
                                                     ShowHatching AS LONG, _             'boolean
                                                     SupportMnemonics AS LONG, _         'boolean
                                                     TextAlign AS LONG, _                'enum, default as 0 (General Align)
                                                     UserMode AS LONG, _                 'boolean, True = mode not supported
                                                     UIDead AS LONG) _                   'boolean, False = mode not supported
                    END SUB
                    '----------------------------------------------------------------------------------------------------
                    There are an awful lot of these beasts! Please, code up some FUNCTIONs, SUBs, and/or MACROs!

                    Stan
                    Do not go quiet into that good night,
                    ... Rage, rage against the dark.

                    Comment


                    • #11
                      Rod,

                      Any progress on the new terms list?

                      Stan
                      Do not go quiet into that good night,
                      ... Rage, rage against the dark.

                      Comment


                      • #12
                        John,

                        Do you have anything on those functions?

                        Stan
                        Do not go quiet into that good night,
                        ... Rage, rage against the dark.

                        Comment


                        • #13
                          Rod just got back late last night from a weekend that was a lot more stressful than it had to be, these things being what they are. I'm hoping to get busy tonight, now I'm back to some quieter surroundings.
                          Rod
                          I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

                          Comment


                          • #14
                            Originally posted by Rodney Hicks View Post
                            Rod just got back late last night from a weekend that was a lot more stressful than it had to be, these things being what they are. I'm hoping to get busy tonight, now I'm back to some quieter surroundings.

                            My sympathies. Glad you made it through.

                            Stan
                            Do not go quiet into that good night,
                            ... Rage, rage against the dark.

                            Comment


                            • #15
                              Stan,
                              A little progress, I think. I hope this is what your after.

                              So far I've just put the terms into your preexisting list, Statements, Functions, and a few(very) constants. I have not set of the other flags other than a %CHALLENGE equate(as yet unvalued) in the list to indicate at least some work required.

                              Check it out and get back to me.
                              Attached Files
                              Rod
                              I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

                              Comment


                              • #16
                                Rod,

                                Will do.

                                Stan

                                a little later: Looks good. This will work.
                                Last edited by StanHelton; 21 Aug 2008, 12:18 PM. Reason: add later message
                                Do not go quiet into that good night,
                                ... Rage, rage against the dark.

                                Comment


                                • #17
                                  I shall plug away at filling as many constants as I can find, saving the fine tuning for later, simply because it may be a case by case scenario.
                                  I'll check out that link from the other forum, but I don't know that it'll solve the issue of finding VB-PB matches.
                                  A little rant here, why would VB change the word before adding the prefix to the SDK term? PB just left the SDK word and added %, but VB sometimes changed the word, and seems like sometimes the value.
                                  Rod
                                  I want not 'not', not Knot, not Knott, not Nott, not knot, not naught, not nought, but aught.

                                  Comment


                                  • #18
                                    Originally posted by Rodney Hicks View Post
                                    I shall plug away at filling as many constants as I can find, saving the fine tuning for later, simply because it may be a case by case scenario.
                                    I'll check out that link from the other forum, but I don't know that it'll solve the issue of finding VB-PB matches.
                                    A little rant here, why would VB change the word before adding the prefix to the SDK term? PB just left the SDK word and added %, but VB sometimes changed the word, and seems like sometimes the value.

                                    Now that I've had a few hours to think about it, we may not need the VB values. If the names are descriptive enough we could just plug in the PBWin values and ignore the silliness of VB on this point. What do you think?

                                    Know what? I think VB was added to Visual Studio as an afterthought. If I remember the early 90's, MS wanted to end all support for BASIC and move everybody to VC++. Of course, that memory may be colored by my dissatisfaction with MS in general.
                                    Do not go quiet into that good night,
                                    ... Rage, rage against the dark.

                                    Comment


                                    • #19
                                      Stan,

                                      I seem to remember that VB was around before Visual Studio, or at least until Visual Studio became popular (?). I was under the impression that Visual Studio, at that time, was more of an after thought and VB 1.0 (and their version of Visual C) was Microsoft's primary focus.

                                      If my memory is faulty and Visual Studio was around with VB 1.0 they certainly weren't as tightly integrated as they are today. I suspect some of the inconsistencies in constant naming you are encountering may be due to Microsoft's uncanny ability to back in VB functionality over a period of time so further Visual Studio releases could integrate and support VB and to make such changes as transparent to the end user as possible.

                                      Now that I've had a few hours to think about it, we may not need the VB values. If the names are descriptive enough we could just plug in the PBWin values and ignore the silliness of VB on this point. What do you think?
                                      I think this is the way to go, if not, we may be playing this game chasing constant meaning and equivalency depending on the VB release and even the service pack the original code was written for. Not my idea of profitable use of time. We do need to alert the user as to this condition and give them the opportunity to review what PB (and our converter) can and can't do for them under the circumstances.
                                      Later...

                                      JR

                                      "When governments fear the people there is liberty. When people fear the government there is tyranny." - Thomas Jefferson

                                      Comment


                                      • #20
                                        Originally posted by John R. Heathcote View Post
                                        Stan,

                                        I seem to remember that VB was around before Visual Studio, or at least until Visual Studio became popular (?). I was under the impression that Visual Studio, at that time, was more of an after thought and VB 1.0 (and their version of Visual C) was Microsoft's primary focus.
                                        You're probably right. I was into something else in the early 90's. All I can say for sure is that the whole VisualMess feels like an afterthought.


                                        ...
                                        I think this is the way to go, if not, we may be playing this game chasing constant meaning and equivalency ... [forever?]

                                        We do need to alert the user as to this condition and give them the opportunity to review what PB (and our converter) can and can't do for them under the circumstances.
                                        Agree.

                                        BTW, on the CCL, I posted a ConverterOptions Type. Just basic stuff so far. I think this might be a starting place for saving those commands? If you agree, please feel free to add whatever you think would be useful.

                                        Stan
                                        Do not go quiet into that good night,
                                        ... Rage, rage against the dark.

                                        Comment

                                        Working...
                                        X