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 Refactor CreateImpementation location bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jzq740176597
Tomato Guru

China
346 Posts

Posted - Mar 24 2015 :  04:27:07 AM  Show Profile  Reply with Quote
VA2059 vs2005 Win7 64bit

all code below located inside one cpp file.


class SDbPluginImp
{
public:
	XPoint	getNameLoc()const;//has body
	XPoint	getMidPt(); //trigger createImpementation
private:
  	CString m_name;
	int	m_num;
	XPoint	m_pt;//leftBot
}


XPoint SDbPluginImp::getNameLoc() const
{
	//left-middle align
	XPoint pt(m_pt);
	pt.x += nameMargin;
	pt.y += getHeight()- nameMargin;
	return pt;
}


//-----before-------//
ENT_VERSION_IMP(SDbPlugin,1)
IMPLEMENT_ENTBASE(SDbPlugin)


//-----after-------//
ENT_VERSION_IMP(SDbPlugin,1)

XPoint SDbPluginImp::getMidPt()//new create!
{

}

IMPLEMENT_ENTBASE(SDbPlugin)

BTW.Both ENT_VERSION_IMP & IMPLEMENT_ENTBASE are macro!

#define ENT_VERSION_IMP(classname,version) \const Adesk::UInt8 classname::entVersion_s(){return version;}

#define IMPLEMENT_ENTBASE(ClassName) \	void ClassName::InitMatchProtocol(BOOL bTrue) { \	}


So why put the new function body between the 2 macros?

I hope to put it above
ENT_VERSION_IMP(SDbPlugin,1)
.

regards!

Creation come from persist!

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 24 2015 :  1:51:00 PM  Show Profile  Reply with Quote
I wasn't able to reproduce the problem here. Can you please try creating a clean new win32 project, open the main cpp file of the project and paste the following after the default code?

#define ENT_VERSION_IMP(classname,version) \const Adesk::UInt8 classname::entVersion_s(){return version;}

#define IMPLEMENT_ENTBASE(ClassName) \	void ClassName::InitMatchProtocol(BOOL bTrue) { \	}

class SDbPluginImp
{
public:
	XPoint	getNameLoc()const;//has body
	XPoint	getMidPt(); //trigger createImpementation
private:
	CString m_name;
	int	m_num;
	XPoint	m_pt;//leftBot
}


XPoint SDbPluginImp::getNameLoc() const
{
	//left-middle align
	XPoint pt(m_pt);
	pt.x += nameMargin;
	pt.y += getHeight() - nameMargin;
	return pt;
}


//-----before-------//
ENT_VERSION_IMP(SDbPlugin, 1)
IMPLEMENT_ENTBASE(SDbPlugin)


//-----after-------//
ENT_VERSION_IMP(SDbPlugin, 1)

IMPLEMENT_ENTBASE(SDbPlugin)


I tried to trigger Create Implementation at this point and got the following:


Do you still see a different result in a clean new project?
I'm wondering whether the context of your project's code or something else contributes to the different results I see.

Edited by - accord on Mar 24 2015 1:57:34 PM
Go to Top of Page

jzq740176597
Tomato Guru

China
346 Posts

Posted - Mar 26 2015 :  9:30:50 PM  Show Profile  Reply with Quote
hi accord.

I have sent a clear vs2005 win32 project which i can reproduce the problem.

To http://www.wholetomato.com/support/contact.asp.

Hope you or you team can check it out.And fix it.

Creation come from persist!
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 27 2015 :  2:33:19 PM  Show Profile  Reply with Quote
I got the file, thank you. I have replied by email.
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