Author Topic: Problem with right-click items in Symbols tb  (Read 6464 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Problem with right-click items in Symbols tb
« on: December 18, 2007, 03:55:30 PM »
SlickEdit 12.0.3, WinXP

I have this declaration in base.h:
Code: [Select]
class base
{
public:
    base();
    virtual ~base();
};

I right-click on 'base', select "Show base in symbol browser"

I right-click on 'base', select "Add member function".  I type "bool bingo(int x)", and check "Virtual".
Click "OK", select base.cpp file for the implementation, and find that my class def has been farkled:
Code: [Select]
class base
{
public:
    virtual bool bingo(int x);
    virtual ~base();
 };

Note that the constructor has been replaced by the new member function. 

I have a derived class in base.h:
Code: [Select]
class derivedOne : public base
{
    public:
        derivedOne();
        virtual ~derivedOne();
};

Right-click on 'derivedOne', select "Show derivedOne in Symbol Browser".
Right-click on 'derivedOne', select "Override virtual function", select 'bingo', select base.cpp file for implementation.

base.h:
Code: [Select]
class derivedOne : public base
{
derivedOne();
virtual ~derivedOne();
   
};
public:
virtual bool bingo(int x);

Note the location of the override's declaration, and the removal of 'public' from above the constructor.

What's going on?  These would be really cool features if I could count on them to work correctly...



Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem with right-click items in Symbols tb
« Reply #1 on: December 18, 2007, 07:44:35 PM »
Thanks for a detailed description for the issue, it is much appreciated.  Using a fresh 12.0.3 vanilla install (Windows XP, CUA emulation, no hotfixes), I was not able reproduce the problem you describe.  What emulation are you using and what sort of options are you using in the File Extension setup, in particular, the formating/beautifier options and indenting options?

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem with right-click items in Symbols tb
« Reply #2 on: December 18, 2007, 08:07:32 PM »
What emulation are you using and what sort of options are you using in the File Extension setup, in particular, the formating/beautifier options and indenting options?
-- Latest hotfix (24)
-- Vim emulation

Formatting:
  -- indent with tabs; tabs: +4, syntax indent: 4
  -- Use SmartPaste.  Use Syntax expansion.

  --  C/C++ Formatting Options
    -- Begin/end style
      -- "style 1" braces
      -- Insert braces immediately; Insert function start brace on new line
    -- Indentation
      -- Indent first level of code; Use continuation indent on function parameters; Indent member
access specifier
   
Hope this helps. 

-------------------------------------------------------
I changed emulation to CUA, and the features worked much better.
I removed all member functions (except ctor/dtor), added the "virtual int bingo(int x)" to base, and overrode it in derived.

base.h:
Code: [Select]
class base
{
public:
virtual int bingo(int x);
base();
virtual ~base();
};



class derivedOne : public base
{
public:
virtual int bingo(int x);
derivedOne();
virtual ~derivedOne();
};

base.cpp:
Code: [Select]
int base::bingo(int x) {

}

int derivedOne::bingo(int x)
{

}
Note the difference in opening brace...
« Last Edit: December 18, 2007, 08:31:51 PM by Wanderer »

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem with right-click items in Symbols tb
« Reply #3 on: December 18, 2007, 09:14:26 PM »
Thanks for the additional info.  Yeah, something is not right due to emulation, and that is definitely an issue that needs to be addressed.  I'll dig in and see if I can spot anything now that I can repro it.  I'll see if a hotfix can be generated.  I also wouldn't be surprised if there were also issues with indention and formatting, but let me try to address the more destructive part of this problem first.

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem with right-click items in Symbols tb
« Reply #4 on: January 14, 2008, 08:42:53 PM »
Any progress on this?  I would be using it several times a week if it worked, it would be a real time-saver.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem with right-click items in Symbols tb
« Reply #5 on: January 15, 2008, 01:48:23 PM »
Yes, there is a hotfix available.  I'm including just the files needed in the attachment that should the issue when in VIM emulation.  Please download the file and apply the hotfix  using Help > Product Updates > Load Hotfix... from the menu.  Let me know if you come across any further issues.

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
Re: Problem with right-click items in Symbols tb
« Reply #6 on: January 15, 2008, 02:42:02 PM »
Yes, there is a hotfix available.  I'm including just the files needed in the attachment that should the issue when in VIM emulation.  Please download the file and apply the hotfix  using Help > Product Updates > Load Hotfix... from the menu.  Let me know if you come across any further issues.

Thank you very much -- this is a great feature.  A minor issue on formatting...
My derived class:
Code: [Select]
class Der1 : public Base
{
public:
Der1() {}
virtual ~Der1() {}

public:

protected:
virtual void Spike(int v);
};
After inserting overridden public and protected functions:
Code: [Select]
class Der1 : public Base
{
public:
virtual void Shout(int jj);
Der1() {}

virtual ~Der1() {}

public:

protected:
virtual void Goober();
virtual void Spike(int v);
};

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Problem with right-click items in Symbols tb
« Reply #7 on: January 15, 2008, 03:16:17 PM »
I'll add that one to the bug tracker, I'd say it's not taking into account the additional the additional indent on the access specifier.