Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.
Moderator: Moderators
-
Naga
- Posts: 45
- Joined: 2003-12-02 11:24
- Location: Sweden
Post
by Naga » 2004-03-13 10:50
Hi,
I'm trying to make custom commands work in TransferView but...
elsewere in the code custom commands support seem to include <br>
Code: Select all
prepareMenu(transferMenu, UserCommand::CONTEXT_TRANSFER, ctrlTransfers.getItemData(i)->user->getClientAddressPort(), ctrlTransfers.getItemData(i)->user->isClientOp());
and
cleanMenu(transferMenu);
these two are declared in UCHandler.h but if I include this file I get this error
Code: Select all
f:\-=No Share=-\src\DCplusplus_CVS\windows\TransferView.cpp(127): error C3861: 'prepareMenu': identifier not found, even with argument-dependent lookup)
and
f:\-=No Share=-\src\DCplusplus_CVS\windows\TransferView.cpp(134): error C3861: 'cleanMenu': identifier not found, even with argument-dependent lookup
does anyone have sugestion as to what I'm doing wrong?
Thanks to all open source programmers!
They enable the rest of us to learn a lot!
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Post
by GargoyleMT » 2004-03-13 12:58
Code: Select all
class HubFrame : public MDITabChildWindowImpl<HubFrame>, private ClientListener,
public CSplitterImpl<HubFrame>, private TimerManagerListener, public UCHandler<HubFrame>,
public UserInfoBaseHandler<HubFrame>
{
Notice, HubFrame (which also uses prepareMenu) inherits from UCHandler -
Code: Select all
template<class T>
class UCHandler {
public:
...
void prepareMenu(CMenu& menu, int ctx, const string& server, bool op) {
So you need to make TransferView inherit from UCHandler too.
-
Naga
- Posts: 45
- Joined: 2003-12-02 11:24
- Location: Sweden
Post
by Naga » 2004-03-14 04:01
Ah so that was the error.
Thanks allot! Some how I feel like
Thanks to all open source programmers!
They enable the rest of us to learn a lot!
-
GargoyleMT
- DC++ Contributor
- Posts: 3212
- Joined: 2003-01-07 21:46
- Location: .pa.us
Post
by GargoyleMT » 2004-03-14 11:31
Naga wrote:Thanks allot! Some how I feel like
Doesn't everyone?