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
 Parser failure when using #import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 24 2014 :  04:31:58 AM  Show Profile  Reply with Quote
Hi!

I have a type library to import. I use it with the rename_namespace keyword.

#import "libid:{8D823185-7FB1-4263-B300-BDE8720A5988}" rename_namespace("AGComDebug"), raw_interfaces_only


But when I use the interfaces with the namespaces VAX shows red underlines on all keywords in the typelib.


CComPtr<AGComDebug::MacroDebugSession> spDebugSession;
spDebugSession->put_SessionHost(spDebugSessionHost);


put_SessionHost is unknown!

TIA

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

Edited by - xMRi on Jul 24 2014 05:28:22 AM

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jul 24 2014 :  3:05:05 PM  Show Profile  Reply with Quote
This sounds like:

case=6261

As a test can you please try removing the "rename_namespace("AGComDebug")" part of the #import line, and after VA has finished parsing this change, see if this makes any difference?

In case 6261 removing the rename_namespace allowed the imported symbols to be suggested correctly.

Depending on your IDE, you may find that turning On:

VA Options -> Listboxes -> Get content from default Intellisense

helps.

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

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 28 2014 :  06:37:26 AM  Show Profile  Reply with Quote
I just verified it. Using the #import statement without rename_namespace works. I can use the defined interfaces freely.
The check on "Get content from default Intellisense" is already set.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jul 28 2014 :  11:54:40 PM  Show Profile  Reply with Quote
Thank you for the update, this is indeed case=6261, unfortunately for now the only known solution is to remove the rename_namespace. I am a little surprised that "Get content from default Intellisense" is not helping, by the sounds of it the IDE is not handling the renamed namespace that well either.

Hopefully removing the rename_namespace is an option for you for now.

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

xMRi
Tomato Guru

Germany
315 Posts

Posted - Jul 29 2014 :  06:01:51 AM  Show Profile  Reply with Quote
I Just turned VAX off and it is correct that even VS-2010 doesn't recognize the namespace.

No this isn't an option, because of internal class names. But in fact it isn't real great problem, because there are just a few functions that I need to call. Sometimes it is possible to live without intellisense, even it is hard :)

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Jul 29 2014 :  1:27:06 PM  Show Profile  Reply with Quote
At least its not just us. That does not help you much, but it is a small consolation from my point of view. Thankfully this is not a massive problem for you.

If you only need to reference a small number of functions from this namespace, have you considered creating VA Snippets for them? You would need to remember the shortcuts, but you could create them all with the same initial shortcut, and then turn On this setting:

http://docs.wholetomato.com/default.asp?W325

so that the snippets will be suggested after typing the common prefix.

zen is the art of being at one with the two'ness
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