Author Topic: push_tag always going to declaration  (Read 2267 times)

mrothman

  • Senior Community Member
  • Posts: 122
  • Hero Points: 1
push_tag always going to declaration
« on: January 24, 2017, 11:44:00 pm »
Using SlickEdit 21, linux.
I've noticed for a while that whatever keystrokes are bound to push_tag (or if I run it directly), it always goes to the declaration of the symbol in question.  This regardless of whether I set the configuration preferences for context tagging in C++ to favor definition or declaration or prompt me.  This used to work great for me (I like having it on prompt), but I can't remember if it changed right when I upgraded to 21 (from 18), or if it changed even further back.
I decided tonight to test it a bit more rigorously, making sure that both proc and proto were actually present in the project and the tag file. Yup.  Anyone seen something like this?  Is there some global preference which rules over the language specific ones?  Thanks.

mrothman

  • Senior Community Member
  • Posts: 122
  • Hero Points: 1
Re: push_tag always going to declaration
« Reply #1 on: January 25, 2017, 12:47:34 am »
Replying to my own post - it's not EVERY symbol after all that does this, only some.  Trying to discover some difference between the succeeding and failing cases.  Most cases are now actually succeeding (after I had toggled the prioritization preference several times).  Wondering whether somehow I fixed it, but there's a cache of previously found symbols that I have to clear.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3816
  • Hero Points: 500
Re: push_tag always going to declaration
« Reply #2 on: January 26, 2017, 03:51:39 pm »
If you are using namespaces, look closely to make sure that the namespace/class name of the proc and the namespace/class name of the prototype match.  Our tagging tries to work around some of the cases, but it can't handle every case.   Also, if you don't have 21.0.1 and the latest hot fix, get it.

Code: [Select]
namespace morris {
   struct The {
      void cat();
      void frisky();
      void tunaBreath();
   };
};

////////////////

void morris::The::cat() {
   cout << "Dennis says this is the right way to declare namespace/class functions." << endl;

   cat();
   frisky();
   tunaBreath();
}

///////////////
using namespace morris;

void The::frisky() {
   cout << "You can do it this way too, I mean, what is the point in making the code explicit and obvious?" << endl;
}

/////////////////////////

#define MY_NAMESPACE_QUAL morris::

void MY_NAMESPACE_QUAL The::tunaBreath() {
   cout << "What if someone was trying to compile this with a 20 year old C++ compiler?  Oh my." << endl;
}