Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11712

Re: Debugging with Visual Studio 2010

$
0
0

Got an answer from PTC tech support. Ends up it was an error in my code!

 

Previously, I had been defining my action as: 

err = ProCmdActionAdd("LM_refit",(uiCmdCmdActFn)LM_refit, uiProe2ndImmediate,(uiCmdAccessFn)ACCESS_AVAILABLE,PRO_B_TRUE, PRO_B_TRUE, &cmd_id);

The problem with this was that ACCESS_AVAILABLE needed to be the RESULT of the uiCmdAccessFn (aka, a function that responds with what the proper access should be). So the proper result would be something like:

 

 

Err = ProCmdActionAdd("LM_refit", (uiCmdCmdActFn) LM_refit,(uiCmdPriority) uiProe2ndImmediate, (uiCmdAccessFn) ToolkitMenuAccess, PRO_B_TRUE, PRO_B_TRUE, &cmd_id);

------------------- where there exists a separate function ------------------------------------------------

uiCmdAccessState ToolkitMenuAccess(uiCmdAccessMode access_mode)

{

return ACCESS_AVAILABLE;

}

 

 

So ultimately, where I thought my code wasn't debugging properly because of an improper setup, it really WAS set up properly the whole time, and I simply had an error in my code that was going unnoticed... so I'm going to call it a "beginner's mistake" haha.

 

Thanks for everyone's help!!


Viewing all articles
Browse latest Browse all 11712

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>