Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Disable CC calltip when context Menu is opened(Same as ValueTooltip in GDB)

<< < (2/3) > >>

ollydbg:
I tested, and these code works fine. :D


--- Code: ---void cbEditor::OnEditorDwellStart(wxScintillaEvent& event)
{
    cbStyledTextCtrl* control = GetControl();
    int pos = control->PositionFromPoint(wxPoint(event.GetX(), event.GetY()));
    int style = control->GetStyleAt(pos);
    if(IsContextMenuOpened()==false)
        NotifyPlugins(cbEVT_EDITOR_TOOLTIP, style, wxEmptyString, event.GetX(), event.GetY());
    OnScintillaEvent(event);
}


--- End code ---

Any comments?

oBFusCATed:
Don't do == false, but use ! :-) This is not C#  :lol:

Jenna:
Are you aware, that we use exactly the same code in debuggergdb.cpp and codecompletion.cpp OnValueTooltip():

--- Code: ---    if(ed->GetControl()->CallTipActive())
    {
     ed->GetControl()->CallTipCancel();
    }

--- End code ---

That means the it's not clear which function wins and supresses the other.

ollydbg:

--- Quote from: jens on June 18, 2009, 02:16:27 pm ---Are you aware, that we use exactly the same code in debuggergdb.cpp and codecompletion.cpp OnValueTooltip():

--- Code: ---    if(ed->GetControl()->CallTipActive())
    {
     ed->GetControl()->CallTipCancel();
    }

--- End code ---

That means the it's not clear which function wins and supresses t

--- End quote ---

Oh, Yes, When I'm debugging, there is only "tip" from debuggergdb.
Seems the "tip" from code completion always be canceled. :D


@oBFusCATed
Thanks for the hint.  :D


Edit:

--- Code: --- // get rid of other calltips (if any) [for example the code completion one, at this time we
// want the debugger value call/tool-tip to win and be shown]
    if(ed->GetControl()->CallTipActive())
    {
    ed->GetControl()->CallTipCancel();
    }

--- End code ---

This code in debuggergdb was added in r5614.

I think we should find another way to disable CC's tip when debugging.

Jenna:

--- Quote from: ollydbg on June 18, 2009, 02:28:18 pm ---Oh, Yes, When I'm debugging, there is only "tip" from debuggergdb.
Seems the "tip" from code completion always be canceled. :D

--- End quote ---

That's because debugger needs more time before the tooltip is called (sending commands to gdb, waiting for response, parsing output...), so it can cancel the other one.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version