Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA Outline:member Func Access Icon Is wrong
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 18 2011 :  12:05:53 AM  Show Profile  Reply with Quote
class CListCtrl_Sortable : public CListCtrl
{
private:
         bool m_Ascending;
         static int  m_SortCol;

         DECLARE_MESSAGE_MAP();
/*private:*/
        afx_msg BOOL OnHeaderClick(NMHDR* pNMHDR, LRESULT* pResult);

          //...
};


when click on OnHeaderClick(),the VA Outline Access Icon is wrong ,it's a private Icon.But on the headerLine it's correct.(In my opinion,the point is DECLARE_MESSAGE_MAP() that expand a protect label.)
In addition,if I put a private label before OnHeaderClick()just like that I have commented out above.It will be identical and correct.
Furthermore,like the class above,the static int datamember m_SortCol,inside this class member function implementation,if the member occure and click on it,in the VA Header will occure "int CListCtrl_Sortable::m_SortCol=1",but in my perspective,I really want to know whether it's a static member,It's really important for programer.
In the VA Outline,For us,the goal it's to let us know all the info about the variable because it's realy do much matter for programing. Just like I click the m_SortCol on the "in CListCtrl_Sortable::m_SortCol=1" in Cpp file-?-?the Header line will display "static int m_SortCol".In one word,I Want to Get "static int CListCtrl_Sortable::m_SortCol=1".
-?-?Beside,why I enter the Tab Button,this Message don't indent normally?-?-?
Thank you! My English is poor

*moved to the Visual Assist X general release section of the forum by feline*

Creation come from persist!

Edited by - feline on Oct 18 2011 2:18:17 PM

feline
Whole Tomato Software

United Kingdom
19017 Posts

Posted - Oct 18 2011 :  3:45:40 PM  Show Profile  Reply with Quote
I am seeing the wrong icon in VA Outline, thank you for the clear example:

case=62066

The static member, do you have:

VA Options -> Advanced -> Display -> Display VA Navigation Bar:

turned On or Off? If it is Off please turn this On. When I place the caret into "m_SortCol" in the cpp file, the VA definition field tells me that this is a static variable.

VA Outline is designed to give you an overview of the current file. If you are sitting in the cpp file, VA Outline is not going to give you a detailed overview of the class declaration in the header file.

Try showing VA View, and showing the class in the bottom part of VA View:

http://www.wholetomato.com/products/features/hcb.asp

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 19 2011 :  02:58:03 AM  Show Profile  Reply with Quote
The VA version of mine is Version 10.6.1856.0.And I have turned Display VA Navigation Bar On.
int CListCtrl_Sortable::GetColumnData_SubItem(int col) const	
{
	m_SortCol
	//...//return col;
}

int CListCtrl_Sortable::m_SortCol;

Along With the previous code sample,If I put caret into"m_SortCol"inside member function "GetColumnData_SubItem" The VA definition field displays "int CListCtrl_Sortable::m_SortCol";Only when I put caret into "m_SortCol" in the definition line in cpp,VA definition field displays "static int m_SortCol" then I can know it's a static member.
I think it a lot,the current mode is maybe reasonable,but I have been troubled with this mode for a long time,especially when check the code of others or mine long time before,I really pay my attention to look the member func code,So when I put caret into a data Member,really want to know the static type info in my first sight otherwise to think about it by distinguishing the definition string "int CListCtrl_Sortable::m_SortCol" for a static and "int m_SortCol" for a non-static.
I speak highly of and enjoy VA because it's intuition what's attract me at first.
(By the way,originally I want insert a image to make my express intuitional. But I'm incapable to use this function of forum. and My text cann't indent with Tab.could you tell me how-?-+or a link for tutorial.)
So I really hope you team can satisfy my demand .For example-?-?"-?-?static-?-?int CListCtrl_Sortable::m_SortCol"-?-?"static int CListCtrl_Sortable::m_SortCol" or sth else.
thanks for your promptly reply!

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19017 Posts

Posted - Oct 19 2011 :  10:37:12 PM  Show Profile  Reply with Quote
I understand now. I have put in a feature request for VA to indicate in the definition field if the variable is static or not:

case=62118

To upload an image, use the link "Reply to Topic", instead of the "Quick Reply" field, and then select "Insert an Image", just below the field where you type your reply.

You cannot type a tab into the reply field, but if you need to use a tab character instead of spaces you can copy and paste it from another editor.

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 20 2011 :  03:31:46 AM  Show Profile  Reply with Quote
I really happy for above reply,I'm sure the VA software will definitely be widely used in the future.
In addition,I also have an analogous complement for the above "case=62118",that's the Func member is "Vitual" or not.



Let's look the img,CDerived class's SortColumn member override the corresponding Func in CBase. when I consult the code of CDerived other member functions or CDerived's declare in header file, I put the caret into the "SortColumn"-?-?the definition field only display "bool SortColumn(int columnIndex, bool ascending)"just like it in the img,yes!it cann't offer the "vitual" info but it really is in fact!
whether the member is vitual or not do serious matter I think,Especially when I need to know if it's bind in run-time ,or if I want inherit another class from the CDerived I really got to know which member func I need to override Or it's overridable for possible inherit later.
But if the inheritance-hierarchy is deep,only the highest class declare has the label"Virtual",then if I need to know the Func is vitual,Now The only method is the users to push "Alt+G" to the highest base-class up to the inheritance-hierarchy,and find out the Func declare,then the users know,Yes,it's really a "vitual",it's overridable.
It's will be tedious, boring and a kind of Heavy work Load.
I admit,Now mode is reasonable becouse the class declare is the unique blueprint of the class-type you defined,then I just simply find the member declare in the class declare block and display it in the VA definntion field,that is OK!
But in the user's perspective,it's possible reasonable but really not helpful.And the C++ syntactic rule allow that despite label "virtual" appear or not it will successfully override the member in CBase.
In my opinion,It's clear and reasonable for the compiler,for compiler is easy and fast to "find" the "virtual" by going up along the inheritance-hierarchy no matter how deep it is.Unfortunately,it's impossible for programer to perform.programer prefer to get the "virtual"info in a intuitional way
Eg.VA can display the "virtual bool SortColumn(int columnIndex, bool ascending)"(add the "virtual" info) if the member func really has override the corresponding func in some of the Base-class, Even though the user don't enter it for saving trouble.

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19017 Posts

Posted - Oct 21 2011 :  1:31:07 PM  Show Profile  Reply with Quote
This makes sense, and it is a good addition to VA, I have put in a feature request for this:

case=62151

Personally, this is why I always try to mark such functions as virtual in my own code, to make clear what is happening, without having to refer back to the base class, but this does not always happen in other code.

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 23 2011 :  10:53:46 PM  Show Profile  Reply with Quote
Another feedback is "VA cann't supply func default parameters normally".




when (1)and(2)section in image in the same file(.h or .cpp)then the floating info is like (3) section in image. But in case they were in different file(Usually,(1)section class declare in .h,(2)section member func implementation in .cpp) then the floating info is only one line:"void ATest::DoSth( int val )".
The difference occurs just when the member func definition puts in different file with class's declare,is this reasonable?
Much more,if making them indentical in 2 cases,should VA do better in displaying the default paramters of member func existing in class's declare? (And Is it a mistake in (3)section the first line floating info with 2 "ATest::"?)

Creation come from persist!

Edited by - jzq740176597 on Oct 23 2011 10:56:12 PM
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 24 2011 :  03:48:21 AM  Show Profile  Reply with Quote
another little question now.see image below:

The selected function is a member of class,If the class is so complicated and the .h file is so long. sometimes I want to konw this file's full path which the selected func resides,but now I don't want to lose the current caret position inside the func by putting caret to outmost scope to displaying the full path info.
if I do so,after know the full path,mostly we have to come back to the former position to continue.it's tedious and troublesome.
So Conclusion is (1)we can have a skill to let the title of VC IDE to display the full path(give up using "..."),(2)VA Adds a full path info item following the normal definition field in that listBox.(of course is cann't be selected.)or other better approach.
But I emphasize the full path info is really acquired,in my perspective,as the upper suggests I supplied,that's to be done all for enhancing the programer's ability for perceiving the existing code and involved surrounding environment.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 24 2011 :  4:06:38 PM  Show Profile  Reply with Quote
Regarding the default parameter is missing: I am seeing the same effect here.

case=62208

Regarding the duplicated class name in the tooltip: Unfortunately this is a known problem.

case=863

quote:
Much more,if making them indentical in 2 cases,should VA do better in displaying the default paramters of member func existing in class's declare?

Can you please repharse this? I don't understand it, sorry.

Edited by - accord on Oct 24 2011 4:06:53 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19017 Posts

Posted - Oct 24 2011 :  7:24:40 PM  Show Profile  Reply with Quote
To find out the file name, you can use the bookmark feature of VC6 to mark your current position, then move the caret to see the file name.

Or, even more quickly, use CTRL+HOME to go to the bottom of the file and read the full file path in the VA definition field, then use ALT+LEFT ARROW to return the caret to the editing position.

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 24 2011 :  11:02:04 PM  Show Profile  Reply with Quote
quote:
quote:
Much more,if making them indentical in 2 cases,should VA do better in displaying the default paramters of member func existing in class's declare?

Can you please repharse this? I don't understand it, sorry.


//OtherHead.h
class ATest{
public:
	void DoSth(int val=1);
};

//OtherHead.cpp
void ATest::DoSth( int val/*=1*/ )
{	}

void main ( int argc, char** argv )
{
	ATest obj;
	obj.DoSth();
}

(1)case,the main() Func is in the same .cpp with the ATest::DoSth(-?-?-?-?when hovering on obj.DoSth(),tooltip has only one line that's the definition of this func.
(2)case,main() ,ATest::DoSth(-?-?are in different file,tooltip will display the declare of the DoSth-?-?-?-?.
in my opinion,it must be indentical,and prefer to display the declare info or a combination of two.becouse the declare contain the full phototype info but it may not contain the parameter name.
Hope your team can find a better resolution.
Gool Luck and thanks for your reply.

Creation come from persist!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 25 2011 :  4:45:51 PM  Show Profile  Reply with Quote
I believe that your last problem is covered by

case=62118
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Oct 30 2011 :  10:45:36 PM  Show Profile  Reply with Quote
Hello.I want to ask a nontechnical question. What time about will the next version be released ? Is sure the cases we have talked above will be fixed or support in the next version? is there a better approach for me can get the info about the new version or the cases I focused without logging on the website everyday?
thanks very much!

Creation come from persist!
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19017 Posts

Posted - Oct 31 2011 :  2:21:45 PM  Show Profile  Reply with Quote
New builds are made available approximately every 1 or 2 months, sometimes more quickly if a build broke something by mistake.

You can click on the link "Subscribe to this topic" at the top of this page to get email notification of new posts. This thread should be updated when the cases discussed here are fixed.

We have now added an RSS feed, so you can use this to watch for new builds of VA:

http://www.wholetomato.com/support/history_rss.asp

zen is the art of being at one with the two'ness
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 01 2011 :  01:06:31 AM  Show Profile  Reply with Quote
I find another bug.the Access Icon is wrong in definition field.
void doSth(){
	CCommonBlkDlg dlg(NULL);
	dlg.getCurSelId();
}

More accurately ot say,it is don't update the Access Icon I think.
getCurSelId() member function is public previously.And later I change it to be protectedAnd I have reparsed the corresponding .h .cpp file.
When I clicked on getCurSelId() It still display the previous public Icon,but actually It has become a protected function.(See the code above,when compiling,Will report Error C2248:cannot access protected member...)
Check it out please.
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 01 2011 :  7:54:59 PM  Show Profile  Reply with Quote
I don't really understand this. Where did CCommonBlkDlg come from? It is your class? It seems it may be deriving from an MFC class because getCurSelId is a common function in that library.
quote:

And later I change it to be protected


You mean you change it in your own derived class? Or in the same file? I tried a little code when I override a public method with a private and it have worked for me:

class base
{
public:
	void func();
};

class derived : public base
{
private:
	void func();
};

void doSth(){
	derived obj;
	obj.func();
}


Or you mean something else? Can you please try writing a stand-alone source sample that demonstrates the problem and post here?

Can you please try rebuilding your symbol databases to see if it helps?
VA Options -> Performance -> Rebuild

Edited by - accord on Nov 01 2011 7:56:26 PM
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 01 2011 :  9:41:16 PM  Show Profile  Reply with Quote
sorry to make you confusing,sir! From now on,I will remember a principle:as long as I ask questions I will try to provide source code to make it clear.
//OtherHead.h
#pragma once
class ATest{
/*public:*/
protected:
	void DoSth(int val12);
};

//OtherHead.cpp
void ATest::DoSth( int val12)
{
	//doSth;
}
void main ( int argc, char** argv )
{
	ATest Obj;
	Obj.DoSth();
}

originally-?-?the DoSth()is public,later I change it as protected,but the DoSthreferences's Access Icon in the definition field is still publicIt's wrong-?-?However,the Access Icon when we click on the implementation line of the function has changed correctly.
I have tried Perfomance->Rebuild,Restart IDE,but it don't work!

Edited by - jzq740176597 on Nov 01 2011 9:43:01 PM
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 02 2011 :  03:17:35 AM  Show Profile  Reply with Quote
And I found a very interesting phenomenon-?-?

//Test.cpp
class ATest{
	/*public:*/
protected:
	void DoSth(int val12=1);
};
// void ATest::DoSth( int val12/*=1*/ )
// {
// }

when I creat a new test class ATest,append only one protected member function DoSth-?-?-?-?.And I put caret into DoSth,the definition field display a Access Icon which is for protected,that's right! But if you implement DoSth-?-?-?-?And then you put caret into it,OH!Access Icon in the definition field become a Public one!If you comment the implementation out,then if you put caret again,everything restore!

Creation come from persist!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 02 2011 :  6:31:45 PM  Show Profile  Reply with Quote
I am seeing the same effect here, thank you for the clear description.

case=1227

It seems you have referred to your older post, as I can see it now
The problem depends on whether you place all the code into the same file or not. When you remove a part it also help as you have noticed. I have tried a few combinations and added notes about them to the case.
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 02 2011 :  9:20:21 PM  Show Profile  Reply with Quote
Thanks For Your Replay.
In the older post,the class declare in the .h file,definition and reference in the .cpp file.the problem also exist.
Hope can find a good solution.
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 16 2011 :  10:16:21 PM  Show Profile  Reply with Quote
Found analogous bug with above.
(1)VAOutline display the private member func with public Access Icon.
//Class h.file fragment
	....
         const AcGePoint3d&getInsPt()const{ return m_ptInsert;}
	void SetInsPt(const AcGePoint3d &pt);
private:
	void indircAddToSubList(const XLine&ln);
          ....

VAOutline display when on .h file page

VAOutline display when on .cpp file page and when click indircAddToSubList() implementation,definition field disp:





VAOutline display the private member func with Wrong public Icon.Definition field display Private Icon is right!


(2)when click on a called reference of this member function within another member function of same class in the cpp,the definition field display the public Icon not private Icon!
Code:
void CEscalatorEntity::AppendToSubList( const XLine&ln,const XPointList& ptLst )
{
	int num=ptLst.Length();
	if(num<2) indircAddToSubList(ln);  //click on this
	else if(num==2 && *ptLst[0] != *ptLst[1]){
	...
}

When click on called indircAddToSubList() Definition field display wrong public icon.


Creation come from persist!

Edited by - jzq740176597 on Nov 16 2011 10:23:46 PM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 17 2011 :  09:29:23 AM  Show Profile  Reply with Quote
point 1: I am seeing the same effect here. Thank you for the clear description.

case=62772
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 17 2011 :  12:15:31 PM  Show Profile  Reply with Quote
point 2: I was able to repro and put in a bug report for this:

case=62780

Your description was easy to follow, thank you.
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 22 2011 :  8:51:24 PM  Show Profile  Reply with Quote
Found another analogous bug with above.I think this maybe the same problem.

//.h file
Class CEscalatorDlg{
public:
       CEscalatorDlg();
       ....
private: //static memer
	static UINT s_uPlatformLen;	
	static int	s_nFloorTypeIndex;
}

//.cpp implementation file
int CEscalatorDlg::s_nFloorTypeIndex=1;

when click on the definition line,the definition field display is right:



but the following reference to the variable in member functions,When click on it,the field display is wrong!




But if change member data into no-static,it will be correct!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 23 2011 :  3:01:50 PM  Show Profile  Reply with Quote
I wasn't able to reproduce this problem. I tried some variations, including yours:

class CEscalatorDlg{
public:
       CEscalatorDlg();
private: //static memer
	static UINT s_uPlatformLen;	
	static int	s_nFloorTypeIndex;
}

int CEscalatorDlg::s_nFloorTypeIndex=1;

But private and public are always showed in the cpp:



I am wondering whether there is something else playing a role or simply there wasn't enough time for VA to apply the changes. Does it help if you try moving the caret to the previous line and back?
If not: can you please try what happens if you place the test code into a clean new test project to see whether something else in your project confuses VA's parser?
Go to Top of Page

jzq740176597
Tomato Guru

China
343 Posts

Posted - Nov 23 2011 :  8:26:36 PM  Show Profile  Reply with Quote
You don't fully understand what I mean.
when click on the definition line in .cpp,the definition field display is right,just like you tested.
But the following reference to the member-data in same .cpp,When click on it,the field display is wrong!
Follow the previous sample:

//.h

class CEscalatorDlg{
public:
       CEscalatorDlg();
private: //static memer
	static UINT s_uPlatformLen;	
	static int	s_nFloorTypeIndex;
}

//.cpp   
int CEscalatorDlg::s_nFloorTypeIndex/*Not click this */=1;

CEscalatorDlg::CEscalatorDlg(){
s_nFloorTypeIndex/*click  here*/=1;
}


And I put them in a new project,and the class is unique,so there's no something else effect.

Creation come from persist!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 25 2011 :  5:02:01 PM  Show Profile  Reply with Quote
*ah* Thanks. I am seeing the same effect here and added a test case with a static variable to

case=62780
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000