Author Topic: Bug in V11?  (Read 16617 times)

ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Bug in V11?
« on: August 02, 2006, 11:26:17 PM »
I've been using V10.0.3 with the GenComment macro set and everything works fine. I added it to a co-workers V11 installation and he doesn't seem to see the GenComment.INI file anywhere but the current working directory. Is there a bug in V11 with the slick_path_search and _config_path() functions?

The loading function is as below

#define GENCOMMENT_INI_FILENAME  "GenComment.ini"

defload()
   {
   g_vslick_vlx     = slick_path_search(SYSTEM_LEXER_FILENAME);
   g_users_vlx     = slick_path_search(USER_LEXER_FILENAME);
   g_genComment_ini = slick_path_search(GENCOMMENT_INI_FILENAME);
   if (g_genComment_ini :== "")
      {
        g_genComment_ini = _config_path() :+ GENCOMMENT_INI_FILENAME;
      }
   }

I have put the file in the macros directory, every directory down the vslickpath environment variable and a few other places to no avail. The only place that it works from is the current working directory. This is frustrating due to the fact of changing directories and projects makes us have multiple copies of the same file, each of which gets blown away by the CVS when we resync.

Any ideas?

ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Bug in V11?
« Reply #1 on: August 03, 2006, 03:59:06 PM »
Everything works fine whether the INI file is the working directory or not, you just don't have any format for it to use. In fact we use the configuration screen to verify that the data isn't there.

The directory you mention is one of the many we have tried.

ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Bug in V11?
« Reply #2 on: August 15, 2006, 03:31:35 PM »
Thanks for the reply Gary, I've finally gotten around to looking at the new files and found that you have definitely made some changes. Too many for my poor brain to figure out as I had made some changes to your old stuff to let me more easily generate headers on functions for NI LabWindows/CVI that work well with doxygen.

The changes I made weren't excessive, added a couple of words ("org" and "brief") along with variables to hold the strings to use, functions for handling CVI specific function types, connections for org and author to environment variables (our network gives "bad" names for the default environment variables), and some changes to the default filler for parameters and returns to enable easier finding areas that need updating. These things are very helpful in my environment and we "can't" live without.

Would it be possible for you to incorporate the changes I made or give me some more direction as to where to insert them in the new code? The file with the modifications of the old version is attached. I would appreciate any help with this.

ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Bug in V11?
« Reply #3 on: August 16, 2006, 02:51:58 PM »
Thanks for the reply, I think you are probably right about the parser being the better place to handle this, I made the changes a few years back in small steps as it was during my transition from CodeWright (the reason for cworg) to SlickEdit. I had written the rough beginnings of a "GenComment" equivalent for CW that I used as my basis for the modifications to your tool. I also wrote a script file for connecting the GUI controls to the documentation (all the information is in a header file LabWindows regenerates every time a change is made to the GUI).

LabWindows is a National Instruments C compiler with some specialization for handling GUIs and instruments (oscilloscopes, meters, power supplies and such things used in laboratories during development of new products or testing of them). A demo version can be downloaded at www.ni.com/lwcvi/. The two main things that are decoded in what I sent you are menu bar handling routines and control handling routines. They each have specific generic prototypes that can be found by the CVICALLBACK define (finds either one) and then classified by the parameter names, panel for controls and menuBar for the menu selections. It also has the ability to create ActiveX servers, their prototypes have varying signatures but the return type has been HRESULT CVIFUNC with a first parameter of CAServerObjHandle objHandle.

I am using doxygen (www.doxygen.org) to extract the documentation from my code and it has parts of the documentation notated different ways (like JavaDoc and CDoc and others) the %brief section is just a brief description that goes in various parts of the documentation that you usually don't want the full description in (indexes and such), it needs to follow the same prefix (@ or \ typically) rules as param and return.

Attached are the INI, my other script, a source file with some of the types of prototypes, header file from a GUI (corresponds to some of the functions in the source file), and if you want I can post two doxygen related "headers" (*.hox) generated by CVI_NoteContol and an output CHM file (MS compiled help file after all processing is done).

Thanks.

ljstrickler

  • Community Member
  • Posts: 11
  • Hero Points: 0
Re: Bug in V11?
« Reply #4 on: August 21, 2006, 03:55:51 PM »
The %brief and %org commands don't seem to work (leaves %brief and %org) and the author is always yours, The parameters also don't have the @param in front of them as specified in the INI file.

If you could add another name for the author that takes priority over the current set (maybe DEVNAME or something like that, the standard USERNAME is locked to a company login employee number). I have verified that USERNAME and CWORG are defined under the OS shell command. CWORG should probably be changed to DEVORG to make it more generic.

I am using SE 10.0.3. I have re-enabled the old version and it works fine using the same variables.
Below is the generated code using the same template (copied it over to new INI) with the latest code:

// *****************************************************************************
//          Function Name:  test                                               *
//   Function Description:                                                     *
/**



    @version  1.0  21-Aug-2006 Initial release.   Gary Ash
    %brief
      test3 Fix me
    @returns Fix me

*/
//                                                                             *
//                                                                             *
//  Software Developer(s):  Gary Ash                                           *
//           Organization:  %org                                               *

aoehlke

  • Community Member
  • Posts: 48
  • Hero Points: 1
Re: Bug in V11?
« Reply #5 on: August 30, 2006, 12:35:15 PM »
I have have a genComment related question.
please see my thread here:
http://community.slickedit.com/index.php?topic=335.0

Moderator, it might be nice to have a sticky about genComment... so that the info is all collected in 1 place.