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
 1532: Overloaded * operator affects tooltips
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thruska
Ketchup Master

71 Posts

Posted - Aug 24 2006 :  12:45:49 PM  Show Profile  Reply with Quote
VAX Intellisense gets confused when an overloaded dereference (*) operator is used. The following code is perfectly valid:

BString TempData;

TempData = "Test\\0Test";
TempData = *TempData.Uppercase();

The resulting string in TempData is "TEST" (without the quotes and no terminating null - BString doesn't need one). Uppercase() returns a type of BString. The overloaded dereference operator returns a type of (signed char *). The order of operations are to execute the Uppercase() method on TempData and then execute a dereference (overloaded) on the temporary BString that Uppercase() returns. If I type:

TempData = *TempData.

VAX incorrectly converts this to:

TempData = *TempData->

Hovering over TempData also displays the wrong tooltip. I should be seeing the data type of TempData and not the overloaded dereference operator's prototype. I'd expect to see the overloaded dereference operator prototype when hovering over the dereference operator (if that's even possible).

Default Intellisense doesn't have any problems with continuing to type after the '.' is entered and also displays the appropriate drop-down list. (VAX doesn't display anything because it converts the . to -> which results in an incorrect code path that wouldn't compile anyway).

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Aug 26 2006 :  6:11:56 PM  Show Profile  Reply with Quote
where are you getting BString from? this is not a class i recognise, and a quick google suggests it might be a GNU class.

i have created a test class that reproduces these problems. dot being converted to -> on a class instance is:

case=2254

the odd tooltip on the instance with the * in front is:

case=2255

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

thruska
Ketchup Master

71 Posts

Posted - Aug 28 2006 :  4:39:46 PM  Show Profile  Reply with Quote
BString is from "Safe C++ Design Principles" (a book I wrote). BString's source is included in that book and is a class I use extensively in my software products and is not related to anything GNU. It combines the best aspects of BASIC, Perl, PHP, C, C++ (STL string), MFC CString, and leaves out the worthless features. It also includes a couple things that I came up with to make life easier when interfacing with 3rd party libraries - for example, the * dereference operator. You don't recognize this class because very few people know about it (the book is relatively "new" and I don't talk about BString that often).

Thomas Hruska
CubicleSoft President
http://www.cubiclesoft.com/
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Oct 06 2006 :  8:03:24 PM  Show Profile  Reply with Quote
Case 2254 is fixed in 1538.
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