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
 Intellisense bug: Smart pointers
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

thruska
Ketchup Master

71 Posts

Posted - Aug 22 2006 :  11:20:01 PM  Show Profile  Reply with Quote
I go to access a Block of SmartPtr (Block< SmartPtr<SimpleClass> >) and there are two ways to access a SmartPtr. This brings up the correct selection of choices:

for (x = 0; x < y; x++)
{
if (SomeVariable[x].
}

From which I selected "Attached()" in the choices. Then I went to access the other method:

for (x = 0; x < y; x++)
{
if (SomeVariable[x].Attached())
{
SomeVariable[x]->
}
}

This brought up the same selection of choices as before. It should be bringing up the contents of the 'SimpleClass' class because the SmartPtr operator -> is overloaded to do precisely that. Somehow VAX is getting slightly confused - probably because Block overloads the [] operator - two overloaded operators in a row is possibly the issue. Just to point out something: The regular Intellisense doesn't even respond to the . operator. VAX is infinitely better at Intellisense even with this bug.

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

thruska
Ketchup Master

71 Posts

Posted - Aug 22 2006 :  11:31:40 PM  Show Profile  Reply with Quote
I went back and tried it again after sending the message and realized that the 'SimpleClass' class contents DO show up but the SmartPtr contents ALSO show up and those are in bold. I just had to scroll down a bit to get to the class data. This is a pretty strange/disconcerting bug because the SmartPtr contents shouldn't even show up because using any of them given the context (-> instead of .) would result in a compiler error.

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

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 23 2006 :  01:27:45 AM  Show Profile  Reply with Quote
Is it possible to provide the definitions of Block and SmartPtr?

VA does have some issues with overloaded operators associated with smart pointers. The more examples we get that break it, the closer we can get to fixing all of the issues.

Joe Pizzi
Go to Top of Page

thruska
Ketchup Master

71 Posts

Posted - Aug 23 2006 :  12:45:48 PM  Show Profile  Reply with Quote
As per my previous message, I just upgraded to 1532 from 1446. 1446 showed both SmartPtr _AND_ 'SimpleClass' methods. 1532 only shows SmartPtr's methods. From my perspective, 1532 is more broken than 1446.

I just sent support ([email protected]) the definitions of Block and SmartPtr privately off this forum. I told them to forward it to you.

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

jpizzi
Tomato Guru

USA
642 Posts

Posted - Aug 24 2006 :  12:30:29 AM  Show Profile  Reply with Quote
I have your definitions. I have whittled them down to just the used methods and default constructors. Of course, compilation (or the ability to compile) doesn't come into play here.

It sure seems like this is an already reported bug, but I can't find it, so I am raising one.

case=2221

Joe Pizzi
Go to Top of Page

rodrigostrauss
New Member

4 Posts

Posted - Sep 04 2006 :  7:21:58 PM  Show Profile  Reply with Quote
I'm having problems with my smart ptr also. Its a COM smart ptr, and the definition is simple (some parts removed for the sake of brevity):


template<class T>
class omni_ptr
{
   T* p;
public:
   omni_ptr()
   {
      p = NULL;
   }

   omni_ptr(const omni_ptr<T>& np)
   {
      p = NULL;
      set(np.p);
   }

   omni_ptr(T* np)
   {
      p = NULL;
      set(np);
   }

   ~omni_ptr()
   {
      static_cast<IUnknown*>((T*)0);
      release();
   }

   void release()
   {
      if(p)
      {
         p->Release();
         p = NULL;
      }

   }

   void set(T* np)
   {
      release();
      p = np;
      if(p)
         p->AddRef();
   }

   T* operator->() const
   {
      return p;
   }

   T*& operator=(T* np)
   {
      set(np);
      return p;
   }

   T*& operator=(const omni_ptr<T>& np)
   {
      set(np.p);
      return p;
   }

   operator T*()
   {
      return p;
   }
};


Sometimes it shows just the IUnknown methods, sometimes it shows methods for some other template instantiation. Is it a bug?

Do I need to send my license info to get an answer? I already sent an email to Whole Tomato support and got no answer.

Strauss
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 05 2006 :  01:34:55 AM  Show Profile  Reply with Quote
Which version of VA are you using? There was some significant COM smart pointer work done in version 1532.

Also, which IDE?

Joe Pizzi
Go to Top of Page

rodrigostrauss
New Member

4 Posts

Posted - Sep 05 2006 :  09:21:03 AM  Show Profile  Reply with Quote
The last one (10.2.1446.0), Visual Studio 2005
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Sep 05 2006 :  11:47:30 PM  Show Profile  Reply with Quote
In that case, could you try the latest version (still called beta)?

http://www.wholetomato.com/downloads/VA_X_Setup1534.exe

Note that this requires support through 2006.09.02

Joe Pizzi
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 14 2007 :  12:08:05 AM  Show Profile  Reply with Quote
Fixed in build 1553.
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