So back to square 1:
Can you provide me with a minimal example that does not work?
Something that I can test here?
Eran
Code Completion not for alle Variables
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Dec 11, 2009 12:23 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
Now
not working:
working (but only screen, not sc):
both working
not working:
Code: Select all
namespace NS1
{
class Screen
{
public:
Screen ();
virtual ~Screen (void);
void Connect (void);
virtual void OnConnect(void) { }
};
} // namespace NS1
namespace NS2
{
class Screen:public NS1::Screen
{
public:
Screen();
virtual ~Screen(void);
void OnConnect (void);
void OnDisConnect (void);
void OnInitScreen (void);
void OnDeInitScreen (void);
};
int main(int argc, char **argv)
{
Screen* screen = (Screen*)(0x1234567L);
Screen sc = Screen();
screen->
sc.
return 0;
}
}
working (but only screen, not sc):
Code: Select all
namespace NS1
{
class Screen
{
public:
Screen ();
virtual ~Screen (void);
void Connect (void);
virtual void OnConnect(void) { }
};
} // namespace NS1
class Screen:public NS1::Screen
{
public:
Screen();
virtual ~Screen(void);
void OnConnect (void);
void OnDisConnect (void);
void OnInitScreen (void);
void OnDeInitScreen (void);
};
int main(int argc, char **argv)
{
Screen* screen = (Screen*)(0x1234567L);
Screen sc;
screen->
sc.
return 0;
}
Code: Select all
class Screen
{
public:
Screen ();
virtual ~Screen (void);
void Connect (void);
virtual void OnConnect(void) { }
};
class Screen1:public Screen
{
public:
Screen1();
virtual ~Screen1(void);
void OnConnect (void);
void OnDisConnect (void);
void OnInitScreen (void);
void OnDeInitScreen (void);
};
int main(int argc, char **argv)
{
Screen1* screen = (Screen1*)(0x1234567L);
Screen1 sc;
screen->
sc.
return 0;
}
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Dec 11, 2009 12:23 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
I only want to ask again, if the code, I posted above, is clear?
Second question: is there any possibility to retrigger code completion, which I mostly saw with ctrl-space?
solved: I saw, this is done with ctrl-return, and this I can change in "keyboard shortcuts..."
Second question: is there any possibility to retrigger code completion, which I mostly saw with ctrl-space?
solved: I saw, this is done with ctrl-return, and this I can change in "keyboard shortcuts..."
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
Thanks for the sample code, I will test it today
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Dec 11, 2009 12:23 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
Cool, I'm looking forward to it.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
From the menu settings:
'Settings > Tags Settings > Advanced'
and check the option:
'Use more accurate scope name resolving'
It should work once ticked.
Eran
'Settings > Tags Settings > Advanced'
and check the option:
'Use more accurate scope name resolving'
It should work once ticked.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Dec 11, 2009 12:23 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code Completion not for alle Variables
Thank you very much, it is working.
The only backside is (taken my first example, the top one), that only members of the derived class are found.
screen->
lists OnConnect, OnDeInitScreen, OnDisConnect, OnInitScreen, Screen, ~Screen
but not "Connect" and other members, which I tried.
sc (Screen sc = Screen();) is still not working. Would be cool, if that woud function too.
But I think, it is already much more better, because in my project, now for example the screen-> members are found (at least in the derived class).
(added better example, which compiles)
The only backside is (taken my first example, the top one), that only members of the derived class are found.
screen->
lists OnConnect, OnDeInitScreen, OnDisConnect, OnInitScreen, Screen, ~Screen
but not "Connect" and other members, which I tried.
sc (Screen sc = Screen();) is still not working. Would be cool, if that woud function too.
But I think, it is already much more better, because in my project, now for example the screen-> members are found (at least in the derived class).
(added better example, which compiles)
Code: Select all
#include <iostream>
using namespace std;
namespace NS1
{
class Screen
{
public:
Screen () {}
virtual ~Screen (void) {}
void Connect (void) {}
void Connect1 (void) {}
virtual void OnConnect2(void) {}
};
}; // namespace NS1
namespace NS2
{
class Screen:public NS1::Screen
{
public:
Screen() {}
virtual ~Screen(void) {}
void OnConnect (void) {}
void OnDisConnect (void) {}
int Get() {return 5;}
void OnInitScreen (void) {}
void OnDeInitScreen (void) {}
};
}; // namespace NS2
int main(int argc, char **argv)
{
//NS2::Screen* screentest = (NS2::Screen*)(0x1234567L);
NS2::Screen sc;
NS2::Screen* screen = ≻
//NS2::Screen sc = NS2::Screen();
//screen->
//sc.
//cout << "Hello got: " << screen->Get() << " from NS2:Screen object sc: sc.Get()" << endl;
cout << "Hello got: " << sc.Get() << " from NS2:Screen object sc: sc.Get()" << endl;
return 0;
}